/* Gunslinger Popup — v1.0.2
   Inherits brand CSS variables from the Gunslinger theme.
   Fallback values match the dark-mode defaults. */

/* ── Overlay ──────────────────────────────────────────────────────────────── */

.gsp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: gsp-fade 0.22s ease both;
}

.gsp-overlay[hidden] {
	display: none;
}

@keyframes gsp-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ── Popup card ───────────────────────────────────────────────────────────── */

.gsp-popup {
	position: relative;
	background: var(--panel, #16181f);
	color: var(--white, #f4f1ec);
	border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
	border-radius: var(--radius-md, 14px);
	max-width: 520px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 2rem;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
	font-family: var(--font-body, 'Barlow', system-ui, sans-serif);
	font-size: 1rem;
	animation: gsp-rise 0.3s var(--ease, cubic-bezier(0.25, 0, 0.15, 1)) both;
}

@keyframes gsp-rise {
	from { transform: translateY(20px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close button ─────────────────────────────────────────────────────────── */

.gsp-popup__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: transparent;
	border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
	color: var(--muted, #d0ccc7);
	border-radius: var(--radius-sm, 6px);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: color var(--t-fast, 0.15s), border-color var(--t-fast, 0.15s), background var(--t-fast, 0.15s);
	padding: 0;
	flex-shrink: 0;
}

.gsp-popup__close:hover,
.gsp-popup__close:focus-visible {
	color: var(--white, #f4f1ec);
	border-color: var(--crimson-mid, #8b0000);
	background: rgba(139, 0, 0, 0.15);
	outline: none;
}

/* ── Section heading ──────────────────────────────────────────────────────── */

.gsp-popup__heading {
	font-family: var(--font-condensed, 'Barlow Condensed', 'Arial Narrow', sans-serif);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--white, #f4f1ec);
	margin: 0 0 1rem;
	padding-right: 2.75rem;
}

/* ── Notifications section ────────────────────────────────────────────────── */

.gsp-notifications[hidden] { display: none; }

.gsp-notifications__list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.gsp-notifications--with-divider {
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.12));
}

/* ── Notification card ────────────────────────────────────────────────────── */

.gsp-notification-card {
	background: var(--near-black, #111318);
	border: 1px solid var(--border-red, rgba(139, 0, 0, 0.35));
	border-radius: var(--radius-sm, 6px);
	padding: 1rem 1.1rem 0.85rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.gsp-notification-card__title {
	font-family: var(--font-condensed, 'Barlow Condensed', sans-serif);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--crimson-lit, #d4635a);
	margin: 0;
}

.gsp-notification-card__content {
	font-size: 0.875rem;
	color: var(--muted, #d0ccc7);
	line-height: 1.65;
}

.gsp-notification-card__content p { margin: 0 0 0.5rem; }
.gsp-notification-card__content p:last-child { margin-bottom: 0; }

.gsp-notification-card__content a {
	color: var(--crimson-lit, #d4635a);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gsp-notification-card__content a:hover {
	color: var(--white, #f4f1ec);
}

.gsp-notification-card__dismiss {
	align-self: flex-end;
	background: transparent;
	border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
	color: var(--muted, #d0ccc7);
	border-radius: var(--radius-sm, 6px);
	padding: 0.25rem 0.8rem;
	font-family: var(--font-body, 'Barlow', sans-serif);
	font-size: 0.78rem;
	cursor: pointer;
	transition: color var(--t-fast, 0.15s), border-color var(--t-fast, 0.15s);
}

.gsp-notification-card__dismiss:hover,
.gsp-notification-card__dismiss:focus-visible {
	color: var(--white, #f4f1ec);
	border-color: rgba(255, 255, 255, 0.3);
	outline: none;
}

/* ── Newsletter section ───────────────────────────────────────────────────── */

.gsp-newsletter[hidden] { display: none; }

.gsp-newsletter__copy {
	font-size: 0.88rem;
	color: var(--muted, #d0ccc7);
	line-height: 1.6;
	margin: 0 0 1rem;
}

/* ── MC4WP form overrides (scoped to popup) ───────────────────────────────── */

#gsp-popup-overlay .mc4wp-form {
	margin: 0;
}

#gsp-popup-overlay .mc4wp-form-fields {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#gsp-popup-overlay .mc4wp-form input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	background: var(--near-black, #111318);
	border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
	border-radius: var(--radius-sm, 6px);
	color: var(--white, #f4f1ec);
	font-family: var(--font-body, 'Barlow', sans-serif);
	font-size: 0.9rem;
	padding: 0.6rem 0.85rem;
	transition: border-color var(--t-fast, 0.15s);
}

#gsp-popup-overlay .mc4wp-form input[type="email"]::placeholder {
	color: var(--muted, #d0ccc7);
	opacity: 0.55;
}

#gsp-popup-overlay .mc4wp-form input[type="email"]:focus {
	outline: none;
	border-color: var(--crimson-mid, #8b0000);
}

#gsp-popup-overlay .mc4wp-form input[type="submit"] {
	width: 100%;
	background: var(--crimson-mid, #8b0000);
	color: var(--white, #f4f1ec);
	border: none;
	border-radius: var(--radius-sm, 6px);
	font-family: var(--font-condensed, 'Barlow Condensed', sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.65rem 1.5rem;
	cursor: pointer;
	transition: background var(--t-fast, 0.15s);
}

#gsp-popup-overlay .mc4wp-form input[type="submit"]:hover {
	background: var(--crimson, #620000);
}

#gsp-popup-overlay .mc4wp-alert {
	font-size: 0.85rem;
	margin-top: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius-sm, 6px);
}

#gsp-popup-overlay .mc4wp-success {
	color: var(--gold, #c9a84c);
	background: rgba(201, 168, 76, 0.08);
	border: 1px solid rgba(201, 168, 76, 0.25);
}

#gsp-popup-overlay .mc4wp-error {
	color: var(--crimson-lit, #d4635a);
	background: rgba(212, 99, 90, 0.08);
	border: 1px solid rgba(212, 99, 90, 0.25);
}

/* ── Light theme overrides ────────────────────────────────────────────────── */

[data-theme="light"] .gsp-popup {
	background: var(--panel, #e3ddd3);
	color: var(--white, #1a1814);
	border-color: var(--border, rgba(0, 0, 0, 0.13));
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .gsp-notification-card {
	background: var(--near-black, #ede8df);
	border-color: var(--border-red, rgba(139, 0, 0, 0.28));
}

[data-theme="light"] #gsp-popup-overlay .mc4wp-form input[type="email"] {
	background: var(--near-black, #ede8df);
	border-color: var(--border, rgba(0, 0, 0, 0.13));
	color: var(--white, #1a1814);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.gsp-popup {
		padding: 1.5rem 1.25rem;
		max-height: 90vh;
		border-radius: var(--radius-sm, 6px);
	}
}
