/**
 * Web Push Notification & Notification Center Drawer Styles
 * Modern OneSignal / WebPush style UI with 5-second opt-in modal & bottom-left notification center.
 */

/* OneSignal-style Slide-down Prompt */
.fcm-modal-backdrop {
	display: none !important;
}

/* OneSignal Slide Prompt Card */
.fcm-modal-dialog {
	position: fixed !important;
	top: 24px !important;
	left: 24px !important;
	transform: translateY(-24px) !important;
	width: calc(100% - 48px) !important;
	max-width: 420px !important;
	background: #ffffff !important;
	border-radius: 14px !important;
	box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.22), 0 0 1px 1px rgba(0, 0, 0, 0.08) !important;
	padding: 20px !important;
	box-sizing: border-box !important;
	z-index: 2147483647 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s !important;
}

.fcm-modal-dialog.fcm-visible {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
}

/* Close Button on Opt-in Modal */
.fcm-modal-close {
	position: absolute !important;
	top: 14px !important;
	right: 14px !important;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	border: none !important;
	background: transparent !important;
	color: #94a3b8 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 16px !important;
	line-height: 1 !important;
	transition: background 0.2s, color 0.2s !important;
	padding: 0 !important;
}

.fcm-modal-close:hover {
	background: #f1f5f9 !important;
	color: #334155 !important;
}

/* Content Layout in Opt-in Modal */
.fcm-modal-body {
	display: flex !important;
	gap: 16px !important;
	align-items: flex-start !important;
}

.fcm-modal-icon-wrap {
	flex-shrink: 0 !important;
	width: 48px !important;
	height: 48px !important;
	border-radius: 12px !important;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
	color: #ffffff !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.fcm-modal-icon-wrap svg {
	width: 26px !important;
	height: 26px !important;
	fill: #ffffff !important;
}

.fcm-modal-text-wrap {
	flex: 1 !important;
}

.fcm-modal-title {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	margin: 0 0 6px 0 !important;
	line-height: 1.3 !important;
}

.fcm-modal-desc {
	font-size: 13.5px !important;
	color: #475569 !important;
	line-height: 1.5 !important;
	margin: 0 !important;
}

/* Actions in Opt-in Modal */
.fcm-modal-actions {
	display: flex !important;
	gap: 10px !important;
	margin-top: 20px !important;
	justify-content: flex-end !important;
}

.fcm-btn-allow {
	background: #2563eb !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 10px 18px !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: background 0.2s, transform 0.1s, box-shadow 0.2s !important;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.fcm-btn-allow:hover:not(:disabled) {
	background: #1d4ed8 !important;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

.fcm-btn-allow:active:not(:disabled) {
	transform: scale(0.98) !important;
}

.fcm-btn-allow:disabled {
	opacity: 0.75 !important;
	cursor: not-allowed !important;
}

.fcm-btn-later {
	background: transparent !important;
	color: #64748b !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	padding: 10px 16px !important;
	font-size: 13.5px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	transition: background 0.2s, color 0.2s, border-color 0.2s !important;
}

.fcm-btn-later:hover {
	background: #f8fafc !important;
	color: #334155 !important;
	border-color: #cbd5e1 !important;
}

/* Feedback Notice Banners */
.fcm-modal-notice {
	margin-top: 14px !important;
	padding: 10px 14px !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	display: none;
}

.fcm-modal-notice.fcm-notice-success {
	background: #f0fdf4 !important;
	color: #166534 !important;
	border: 1px solid #bbf7d0 !important;
	display: block !important;
}

.fcm-modal-notice.fcm-notice-error {
	background: #fef2f2 !important;
	color: #991b1b !important;
	border: 1px solid #fecaca !important;
	display: block !important;
}

/* -------------------------------------------------------------
 * FLOATING BELL WIDGET (Positioned at bottom-left)
 * ------------------------------------------------------------- */
.fcm-bell-widget {
	position: fixed !important;
	bottom: 24px !important;
	left: 24px !important;
	right: auto !important;
	z-index: 2147483640 !important;
	display: block !important;
	visibility: visible !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

#fcm-web-push-container svg {
	box-sizing: border-box !important;
}

.fcm-bell-btn {
	position: relative !important;
	width: 52px !important;
	height: 52px !important;
	min-width: 52px !important;
	min-height: 52px !important;
	max-width: 52px !important;
	max-height: 52px !important;
	border-radius: 50% !important;
	background: #2563eb !important;
	color: #ffffff !important;
	border: none !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.42) !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	outline: none !important;
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s !important;
}

.fcm-bell-btn:hover {
	transform: scale(1.08) !important;
	background: #1d4ed8 !important;
	box-shadow: 0 8px 25px rgba(37, 99, 235, 0.52) !important;
}

.fcm-bell-btn svg {
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
	min-height: 24px !important;
	max-width: 24px !important;
	max-height: 24px !important;
	fill: #ffffff !important;
	display: block !important;
	margin: auto !important;
}

/* Red Count Badge on Bell */
.fcm-bell-badge {
	position: absolute !important;
	top: -2px !important;
	right: -2px !important;
	min-width: 19px !important;
	height: 19px !important;
	padding: 0 4px !important;
	background: #ef4444 !important;
	color: #ffffff !important;
	border: 2px solid #ffffff !important;
	border-radius: 10px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	animation: fcmPulse 2.5s infinite !important;
	box-sizing: border-box !important;
}

@keyframes fcmPulse {
	0% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
	}
}

/* -------------------------------------------------------------
 * NOTIFICATION CENTER DRAWER (Pops up above Bell Icon)
 * ------------------------------------------------------------- */
.fcm-drawer {
	position: absolute !important;
	bottom: 66px !important;
	left: 0 !important;
	width: 360px !important;
	max-width: calc(100vw - 36px) !important;
	max-height: 480px !important;
	background: #ffffff !important;
	border-radius: 16px !important;
	box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.28), 0 0 1px 1px rgba(0, 0, 0, 0.08) !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(12px) scale(0.96) !important;
	transform-origin: bottom left !important;
	transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s !important;
	z-index: 2147483645 !important;
}

.fcm-drawer.fcm-visible {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) scale(1) !important;
}

/* Drawer Header */
.fcm-drawer-header {
	padding: 14px 18px !important;
	background: #f8fafc !important;
	border-bottom: 1px solid #e2e8f0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
}

.fcm-drawer-title-wrap {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
}

.fcm-drawer-header-icon {
	width: 18px !important;
	height: 18px !important;
	fill: #2563eb !important;
}

.fcm-drawer-title {
	margin: 0 !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
}

.fcm-drawer-count {
	font-size: 11px !important;
	font-weight: 700 !important;
	background: #e2e8f0 !important;
	color: #475569 !important;
	padding: 2px 7px !important;
	border-radius: 12px !important;
}

/* Drawer Close Button "✕" */
.fcm-drawer-close {
	background: transparent !important;
	border: none !important;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	color: #64748b !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 15px !important;
	line-height: 1 !important;
	transition: background 0.2s, color 0.2s !important;
	padding: 0 !important;
}

.fcm-drawer-close:hover {
	background: #e2e8f0 !important;
	color: #0f172a !important;
}

/* Opt-in Quick Bar inside Drawer */
.fcm-drawer-optin-bar {
	padding: 10px 16px !important;
	background: #eff6ff !important;
	border-bottom: 1px solid #dbeafe !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px !important;
}

.fcm-optin-text {
	font-size: 12px !important;
	color: #1e40af !important;
	line-height: 1.35 !important;
	flex: 1 !important;
}

.fcm-optin-active {
	font-size: 12px !important;
	font-weight: 600 !important;
	color: #166534 !important;
	display: flex !important;
	align-items: center !important;
	gap: 4px !important;
}

.fcm-btn-mini-subscribe {
	background: #2563eb !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 5px 11px !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	transition: background 0.2s !important;
}

.fcm-btn-mini-subscribe:hover {
	background: #1d4ed8 !important;
}

/* Notifications List Container */
.fcm-drawer-list {
	max-height: 380px !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	overscroll-behavior: contain !important;
}

.fcm-drawer-list::-webkit-scrollbar {
	width: 5px;
}
.fcm-drawer-list::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

/* Empty State */
.fcm-drawer-empty {
	padding: 40px 20px !important;
	text-align: center !important;
	color: #94a3b8 !important;
}

.fcm-drawer-empty svg {
	width: 38px !important;
	height: 38px !important;
	fill: #cbd5e1 !important;
	margin-bottom: 10px !important;
}

.fcm-drawer-empty p {
	font-size: 13.5px !important;
	margin: 0 !important;
}

/* Individual Notification Item */
.fcm-notification-item-wrap {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	border-bottom: 1px solid #f1f5f9 !important;
	transition: background 0.15s ease !important;
}

.fcm-notification-item-wrap:last-child {
	border-bottom: none !important;
}

.fcm-notification-item-wrap:hover {
	background: #f8fafc !important;
}

.fcm-notification-item {
	display: flex !important;
	gap: 12px !important;
	padding: 12px 16px !important;
	flex: 1 !important;
	text-decoration: none !important;
	color: inherit !important;
	align-items: flex-start !important;
}

.fcm-item-thumb {
	flex-shrink: 0 !important;
	width: 54px !important;
	height: 54px !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	background: #f1f5f9 !important;
}

.fcm-item-thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
}

.fcm-item-icon {
	flex-shrink: 0 !important;
	width: 44px !important;
	height: 44px !important;
	border-radius: 10px !important;
	background: #eff6ff !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.fcm-item-icon svg {
	width: 22px !important;
	height: 22px !important;
	fill: #2563eb !important;
}

.fcm-item-content {
	flex: 1 !important;
	min-width: 0 !important;
}

.fcm-item-title {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	margin: 0 0 3px 0 !important;
	line-height: 1.3 !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
}

.fcm-item-body {
	font-size: 12px !important;
	color: #64748b !important;
	line-height: 1.4 !important;
	margin: 0 0 4px 0 !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2 !important;
	-webkit-box-orient: vertical !important;
	overflow: hidden !important;
}

.fcm-item-time {
	font-size: 11px !important;
	color: #94a3b8 !important;
	display: block !important;
}

/* Individual Item Dismiss Button "✕" */
.fcm-item-dismiss {
	background: transparent !important;
	border: none !important;
	width: 24px !important;
	height: 24px !important;
	border-radius: 50% !important;
	color: #cbd5e1 !important;
	cursor: pointer !important;
	margin-right: 10px !important;
	font-size: 12px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background 0.15s, color 0.15s !important;
	padding: 0 !important;
	opacity: 0.6 !important;
}

.fcm-notification-item-wrap:hover .fcm-item-dismiss {
	opacity: 1 !important;
	color: #94a3b8 !important;
}

.fcm-item-dismiss:hover {
	background: #fee2e2 !important;
	color: #ef4444 !important;
}

/* -------------------------------------------------------------
 * FOREGROUND NOTIFICATION TOAST BANNER (Requirement 3)
 * ------------------------------------------------------------- */
.fcm-foreground-toast {
	position: fixed !important;
	top: 24px !important;
	right: 24px !important;
	max-width: 380px !important;
	background: #ffffff !important;
	border-radius: 12px !important;
	box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.22), 0 0 1px 1px rgba(0, 0, 0, 0.08) !important;
	z-index: 2147483647 !important;
	cursor: pointer !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(-16px) !important;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.fcm-foreground-toast.fcm-toast-visible {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
}

.fcm-toast-inner {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 14px 16px !important;
}

.fcm-toast-thumb {
	width: 48px !important;
	height: 48px !important;
	border-radius: 8px !important;
	object-fit: cover !important;
	flex-shrink: 0 !important;
}

.fcm-toast-icon {
	width: 40px !important;
	height: 40px !important;
	border-radius: 10px !important;
	background: #2563eb !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
}

.fcm-toast-icon svg {
	width: 22px !important;
	height: 22px !important;
	fill: #ffffff !important;
}

.fcm-toast-content {
	flex: 1 !important;
	min-width: 0 !important;
}

.fcm-toast-title {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	display: block !important;
	line-height: 1.3 !important;
	margin-bottom: 2px !important;
}

.fcm-toast-body {
	font-size: 12px !important;
	color: #475569 !important;
	line-height: 1.4 !important;
	margin: 0 !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.fcm-toast-close {
	background: transparent !important;
	border: none !important;
	color: #94a3b8 !important;
	font-size: 14px !important;
	cursor: pointer !important;
	padding: 4px !important;
	border-radius: 4px !important;
}

.fcm-toast-close:hover {
	color: #0f172a !important;
}

/* -------------------------------------------------------------
 * MOBILE RESPONSIVENESS
 * ------------------------------------------------------------- */
@media (max-width: 640px) {
	.fcm-modal-dialog {
		top: 16px !important;
		width: calc(100% - 32px) !important;
		padding: 20px !important;
	}

	.fcm-modal-actions {
		flex-direction: column-reverse !important;
	}

	.fcm-btn-allow,
	.fcm-btn-later {
		width: 100% !important;
		text-align: center !important;
	}

	.fcm-bell-widget {
		bottom: 16px !important;
		left: 16px !important;
	}

	.fcm-bell-btn {
		width: 48px !important;
		height: 48px !important;
	}

	.fcm-drawer {
		width: calc(100vw - 32px) !important;
		max-height: 420px !important;
		bottom: 60px !important;
	}

	.fcm-foreground-toast {
		left: 16px !important;
		right: 16px !important;
		top: 16px !important;
		max-width: none !important;
	}
}
