/* ==========================================================================
   THE 12TH — Compliance & Accessibility Layer
   Brand tokens (--bg-color, --surface-color, --accent-color, --accent-glow,
   --transition-premium) live in style.css :root.
   ========================================================================== */

/* ── Screen-reader-only utility ─────────────────────────────────────────── */
.the12th-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Skip-to-content link ───────────────────────────────────────────────── */
.the12th-skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 1000010;
	padding: 14px 22px;
	background: var(--bg-color, #000);
	color: var(--accent-color, #D4AF37);
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid var(--accent-color, #D4AF37);
	border-radius: 2px;
	transform: translateY(calc(-100% - 24px));
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.the12th-skip-link:focus,
.the12th-skip-link:focus-visible {
	transform: translateY(0);
	outline: 2px solid var(--accent-color, #D4AF37);
	outline-offset: 3px;
	box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

/* ── Global :focus-visible — gold ring matching brand ───────────────────── */
*:focus { outline: none; }
*:focus-visible {
	outline: 2px solid var(--accent-color, #D4AF37);
	outline-offset: 3px;
	box-shadow: 0 0 0 4px var(--accent-glow, rgba(212, 175, 55, 0.15));
	border-radius: 2px;
}
/* Don't double-up on form fields that already have a brand focus state. */
.woocommerce input:focus-visible,
.woocommerce textarea:focus-visible,
.woocommerce select:focus-visible {
	outline-offset: 0;
	box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   Buttons (banner, modal)
   Mirror the gold CTA in functions.php so the components feel native.
   ========================================================================== */
.the12th-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	white-space: nowrap;
	box-sizing: border-box;
}
.the12th-btn--gold {
	background: var(--accent-color, #D4AF37);
	color: #000;
}
.the12th-btn--gold:hover {
	background: #fff;
	color: #000;
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}
.the12th-btn--ghost {
	background: transparent;
	color: var(--accent-color, #D4AF37);
	border-color: var(--accent-color, #D4AF37);
}
.the12th-btn--ghost:hover {
	background: var(--accent-color, #D4AF37);
	color: #000;
}

/* ==========================================================================
   Consent banner — fixed bottom strip, glass blur, slide-in
   ========================================================================== */
.the12th-consent-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100050;
	background: rgba(11, 18, 29, 0.96);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-top: 1px solid var(--accent-color, #D4AF37);
	color: var(--text-main, #fff);
	transform: translateY(110%);
	transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.the12th-consent-banner.is-visible { transform: translateY(0); }
.the12th-consent-banner[hidden]    { display: none; }

.the12th-consent-banner__inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 28px 48px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 32px;
	align-items: center;
}
.the12th-consent-banner__copy { max-width: 720px; }
.the12th-consent-banner__title {
	font-family: 'Playfair Display', serif;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--accent-color, #D4AF37);
	text-transform: uppercase;
	line-height: 1;
	margin-bottom: 8px;
}
.the12th-consent-banner__body {
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	font-weight: 300;
	line-height: 1.6;
	color: var(--text-main, #fff);
	margin: 0;
}
.the12th-consent-banner__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

@media (max-width: 768px) {
	.the12th-consent-banner__inner {
		grid-template-columns: 1fr;
		padding: 24px 20px;
		gap: 20px;
	}
	.the12th-consent-banner__actions { justify-content: stretch; }
	.the12th-consent-banner__actions .the12th-btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Preferences modal — full-screen overlay (mirrors .noir-nav pattern)
   ========================================================================== */
.the12th-consent-modal {
	position: fixed;
	inset: 0;
	z-index: 100060;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}
.the12th-consent-modal.is-open {
	opacity: 1;
	visibility: visible;
}
.the12th-consent-modal[hidden] { display: none; }

.the12th-consent-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
}
.the12th-consent-modal__panel {
	position: relative;
	width: min(640px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	background: var(--surface-color, #0B121D);
	border: 1px solid rgba(212, 175, 55, 0.25);
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
	padding: 56px 48px 40px;
}
.the12th-consent-modal__close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: transparent;
	border: none;
	color: var(--accent-color, #D4AF37);
	font-size: 2rem;
	font-weight: 200;
	line-height: 1;
	cursor: pointer;
	padding: 4px 10px;
	transition: color 0.3s ease;
}
.the12th-consent-modal__close:hover { color: #fff; }

.the12th-consent-modal__title {
	font-family: 'Playfair Display', serif;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--accent-color, #D4AF37);
	text-transform: uppercase;
	margin-bottom: 12px;
}
.the12th-consent-modal__intro {
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	font-weight: 300;
	line-height: 1.6;
	color: var(--text-dim, #999);
	margin: 0 0 28px;
}

/* ── Toggle rows ────────────────────────────────────────────────────────── */
.the12th-consent-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
	padding: 20px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.the12th-consent-row:first-of-type { border-top: 0; }
.the12th-consent-row__title {
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--text-main, #fff);
	margin-bottom: 6px;
}
.the12th-consent-row__desc {
	font-family: 'Inter', sans-serif;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--text-dim, #999);
	margin: 0;
}

/* ── Custom toggle switch ───────────────────────────────────────────────── */
.the12th-consent-toggle {
	position: relative;
	display: inline-block;
	cursor: pointer;
	flex-shrink: 0;
}
.the12th-consent-toggle.is-locked { cursor: not-allowed; opacity: 0.5; }
.the12th-consent-toggle input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: inherit;
}
.the12th-consent-toggle__track {
	display: block;
	width: 52px;
	height: 28px;
	background: var(--surface-color, #0B121D);
	border: 1px solid var(--text-dim, #666);
	border-radius: 28px;
	position: relative;
	transition: background 0.3s ease, border-color 0.3s ease;
}
.the12th-consent-toggle__knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: var(--text-dim, #666);
	border-radius: 50%;
	transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
	            background 0.3s ease;
}
.the12th-consent-toggle input:checked ~ .the12th-consent-toggle__track {
	background: var(--accent-color, #D4AF37);
	border-color: var(--accent-color, #D4AF37);
}
.the12th-consent-toggle input:checked ~ .the12th-consent-toggle__track .the12th-consent-toggle__knob {
	transform: translateX(24px);
	background: #000;
}
.the12th-consent-toggle input:focus-visible ~ .the12th-consent-toggle__track {
	box-shadow: 0 0 0 4px var(--accent-glow, rgba(212, 175, 55, 0.15));
}

.the12th-consent-modal__footer {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	flex-wrap: wrap;
}

@media (max-width: 540px) {
	.the12th-consent-modal__panel { padding: 48px 24px 28px; }
	.the12th-consent-modal__footer .the12th-btn { flex: 1 1 100%; }
}

/* Lock body scroll when modal is open. */
body.the12th-consent-modal-open { overflow: hidden; }

/* ==========================================================================
   Legal footer
   ========================================================================== */
.the12th-legal-footer {
	background: var(--bg-color, #000);
	border-top: 1px solid var(--accent-color, #D4AF37);
	padding: 56px 48px 40px;
	color: var(--text-dim, #888);
	font-family: 'Inter', sans-serif;
}
.the12th-legal-footer__inner {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
}
.the12th-legal-footer__nav { width: 100%; }
.the12th-legal-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	justify-content: center;
}
.the12th-legal-footer__item {
	display: flex;
	align-items: center;
}
.the12th-legal-footer__item:not(:last-child)::after {
	content: '';
	display: inline-block;
	width: 4px;
	height: 4px;
	background: var(--accent-color, #D4AF37);
	border-radius: 50%;
	margin: 0 18px;
	opacity: 0.6;
}
.the12th-legal-footer__link {
	font-size: 0.6875rem;
	font-weight: 300;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--text-dim, #888);
	text-decoration: none;
	transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	padding: 8px 4px;
	white-space: nowrap;
}
.the12th-legal-footer__link:hover,
.the12th-legal-footer__link:focus-visible {
	color: var(--accent-color, #D4AF37);
}
.the12th-legal-footer__link.is-action { cursor: pointer; }

.the12th-legal-footer__copy {
	font-size: 0.6875rem;
	font-weight: 300;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-dim, #666);
	margin: 0;
	text-align: center;
}
.the12th-legal-footer__regime {
	display: inline-block;
	margin-left: 14px;
	padding: 2px 10px;
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 2px;
	color: var(--accent-color, #D4AF37);
	font-size: 0.625rem;
	letter-spacing: 0.3em;
}

@media (max-width: 640px) {
	.the12th-legal-footer { padding: 40px 20px 28px; }
	.the12th-legal-footer__list { gap: 4px 0; }
	.the12th-legal-footer__item:not(:last-child)::after { margin: 0 10px; }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.the12th-consent-banner,
	.the12th-consent-modal,
	.the12th-consent-modal__panel,
	.the12th-consent-toggle__track,
	.the12th-consent-toggle__knob,
	.the12th-legal-footer__link,
	.the12th-skip-link,
	.the12th-btn {
		transition-duration: 0.01ms !important;
	}
	.the12th-consent-banner { transform: none; }
	.the12th-consent-banner.is-visible { transform: none; }
	.the12th-btn--gold:hover { transform: none; box-shadow: none; }
}
