/* Custom Notifications Styles for CyberShield */

/* --- Core Themes & CSS Variables --- */
:root {
	--notif-default-bg: #1e2d47;
	--notif-default-color: #e8eaf2;
	--notif-default-accent: #00ff9d;
	--notif-default-border: rgba(255, 255, 255, 0.08);
	--notif-default-shadow: rgba(0, 0, 0, 0.5);
	--notif-default-backdrop: rgba(10, 18, 30, 0.75);
}

[data-theme="light"] {
	--notif-default-bg: #ffffff;
	--notif-default-color: #1f2937;
	--notif-default-accent: #008f5d;
	--notif-default-border: rgba(0, 0, 0, 0.08);
	--notif-default-shadow: rgba(0, 0, 0, 0.15);
	--notif-default-backdrop: rgba(10, 18, 30, 0.4);
}

.cs-notification-container {
	position: fixed;
	z-index: 999999;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}

.cs-notification-container * {
	box-sizing: border-box;
}

/* --- Backdrop (Modal) --- */
.cs-notification-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--notif-backdrop, var(--notif-default-backdrop));
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: -1;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* --- Notification Box (Base) --- */
.cs-notification-box {
	background: var(--notif-bg, var(--notif-default-bg));
	color: var(--notif-color, var(--notif-default-color));
	border-radius: var(--notif-radius, 8px);
	box-shadow: 0 20px 40px var(--notif-default-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
	border: 1px solid var(--notif-border, var(--notif-default-border));
	position: relative;
	width: 100%;
	max-height: calc(100vh - 40px) !important;
	overflow-y: auto !important;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
	opacity: 0;
}

/* Close button */
.cs-notification-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: transparent;
	border: none;
	color: var(--notif-color, var(--notif-default-color));
	font-size: 24px;
	font-weight: 300;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.6;
	transition: opacity 0.2s, transform 0.2s;
	z-index: 10;
}

.cs-notification-close:hover {
	opacity: 1;
	transform: scale(1.1);
}

/* Content & Typography */
.cs-notification-content-wrapper {
	padding: 24px;
}

.cs-notification-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 12px 0;
	padding-right: 24px;
	color: var(--notif-accent, var(--notif-default-accent));
}

.cs-notification-body {
	font-size: 0.95rem;
	line-height: 1.6;
	opacity: 0.9;
}

.cs-notification-body p {
	margin: 0 0 12px 0;
}

.cs-notification-body p:last-child {
	margin-bottom: 0;
}

/* Ad slot integration */
.cs-notification-ad-slot {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--notif-default-border);
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

.cs-notification-ad-slot .cs-ad-wrap {
	margin: 0 !important;
	width: 100%;
}

/* --- Position Layouts --- */

/* 1. Modal (Centered) */
.cs-notif-pos-modal {
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cs-notif-pos-modal .cs-notification-box {
	max-width: var(--notif-width, 500px);
	transform: scale(0.9) translateY(20px);
}

.cs-notif-pos-modal.cs-notif-active .cs-notification-backdrop {
	opacity: 1;
}

.cs-notif-pos-modal.cs-notif-active .cs-notification-box {
	opacity: 1;
	transform: scale(1) translateY(0);
}

/* 2. Top Bar (Full Width) */
.cs-notif-pos-top-bar {
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	padding: 0;
}

.cs-notif-pos-top-bar .cs-notification-box {
	border-radius: 0;
	border-left: none;
	border-right: none;
	border-top: none;
	transform: translateY(-100%);
	max-width: 100%;
}

.cs-notif-pos-top-bar.cs-notif-active .cs-notification-box {
	opacity: 1;
	transform: translateY(0);
}

/* 3. Bottom Bar (Full Width) */
.cs-notif-pos-bottom-bar {
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	padding: 0;
}

.cs-notif-pos-bottom-bar .cs-notification-box {
	border-radius: 0;
	border-left: none;
	border-right: none;
	border-bottom: none;
	transform: translateY(100%);
	max-width: 100%;
}

.cs-notif-pos-bottom-bar.cs-notif-active .cs-notification-box {
	opacity: 1;
	transform: translateY(0);
}

/* 4. Slide-in Right & Left */
.cs-notif-pos-slide-in-right {
	bottom: 24px;
	right: 24px;
	width: calc(100% - 48px);
	max-width: var(--notif-width, 420px);
}

.cs-notif-pos-slide-in-right .cs-notification-box {
	transform: translateX(100px) translateY(20px);
}

.cs-notif-pos-slide-in-right.cs-notif-active .cs-notification-box {
	opacity: 1;
	transform: translateX(0) translateY(0);
}

.cs-notif-pos-slide-in-left {
	bottom: 24px;
	left: 24px;
	width: calc(100% - 48px);
	max-width: var(--notif-width, 420px);
}

.cs-notif-pos-slide-in-left .cs-notification-box {
	transform: translateX(-100px) translateY(20px);
}

.cs-notif-pos-slide-in-left.cs-notif-active .cs-notification-box {
	opacity: 1;
	transform: translateX(0) translateY(0);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
	.cs-notification-content-wrapper {
		padding: 20px 16px;
	}
	
	.cs-notification-title {
		font-size: 1.15rem;
	}
	
	.cs-notification-body {
		font-size: 0.9rem;
	}

	.cs-notif-pos-slide-in-right,
	.cs-notif-pos-slide-in-left {
		bottom: 16px;
		right: 16px;
		left: 16px;
		width: calc(100% - 32px);
		max-width: none;
	}

	.cs-notif-pos-slide-in-right .cs-notification-box {
		transform: translateY(50px);
	}
	.cs-notif-pos-slide-in-right.cs-notif-active .cs-notification-box {
		transform: translateY(0);
	}

	.cs-notif-pos-slide-in-left .cs-notification-box {
		transform: translateY(50px);
	}
	.cs-notif-pos-slide-in-left.cs-notif-active .cs-notification-box {
		transform: translateY(0);
	}
}

/* Extra optimization for narrow viewports (max-width: 480px) to prevent 300px ad overflow */
@media (max-width: 480px) {
	.cs-notif-pos-modal {
		padding: 10px !important;
	}
	.cs-notification-content-wrapper {
		padding: 16px 10px !important;
	}
}
