/* =============================================================================
   Bogdánbor — Age Gate Overlay
   Full-screen 18+ verification modal. Premium winery dark aesthetic.
   Requires: assets/css/typography.css (design tokens).
   ============================================================================= */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.bb-age-gate {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(8, 3, 0, 0.97);
	padding: 1.5rem;

	/* Start invisible; JS adds .bb-age-gate--active to reveal. */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.bb-age-gate--active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto; /* `all` is SVG-only; `auto` is correct for HTML */
}

/* ── Scroll lock ─────────────────────────────────────────────────────────── */
body.bb-age-gate-open {
	overflow: hidden;
}

/* ── Dialog card ─────────────────────────────────────────────────────────── */
.bb-age-gate__dialog {
	position: relative;
	background-color: #0e0705;
	border: 1px solid rgba(193, 154, 107, 0.18);
	padding: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 5vw, 3.5rem);
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	text-align: center;

	transform: translateY(14px);
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.bb-age-gate--active .bb-age-gate__dialog {
	transform: translateY(0);
}

/* ── Decorative top rule ─────────────────────────────────────────────────── */
.bb-age-gate__dialog::before {
	content: '';
	display: block;
	width: 36px;
	height: 1px;
	background-color: rgba(193, 154, 107, 0.55);
	margin: 0 auto 2rem;
}

/* ── Mobile cap ──────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
	.bb-age-gate__dialog {
		max-width: 90vw;
		padding: 2rem 1.5rem;
	}
}

/* ── Eyebrow label ───────────────────────────────────────────────────────── */
.bb-age-gate__eyebrow {
	display: block;
	font-family: var(--font-ui, 'Jost', sans-serif);
	font-size: 0.5625rem;
	font-weight: 400;
	letter-spacing: var(--tracking-ultra, 0.2em);
	text-transform: uppercase;
	color: rgba(193, 154, 107, 0.65);
	margin-bottom: 1.25rem;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.bb-age-gate__title {
	font-family: var(--font-serif, 'EB Garamond', Georgia, serif);
	font-size: clamp(1.625rem, 4vw, 2.25rem);
	font-weight: 400;
	line-height: var(--leading-snug, 1.3);
	letter-spacing: var(--tracking-wide, 0.03em);
	color: #f0ebe3;
	margin: 0 0 1.25rem;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.bb-age-gate__desc {
	font-family: var(--font-ui, 'Jost', sans-serif);
	font-size: 0.875rem;
	font-weight: 300;
	line-height: var(--leading-relaxed, 1.85);
	color: rgba(240, 235, 227, 0.5);
	margin: 0 0 2.5rem;
}

/* ── Actions container ───────────────────────────────────────────────────── */
.bb-age-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	align-items: stretch;
}

/* ── Buttons: shared base ────────────────────────────────────────────────── */
.bb-age-gate__btn {
	display: block;
	width: 100%;
	min-height: 52px; /* WCAG touch target */
	padding: 0.875rem 2rem;
	border: 1px solid transparent;
	font-family: var(--font-ui, 'Jost', sans-serif);
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: var(--tracking-widest, 0.16em);
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* WCAG 2.1 AA focus indicator */
.bb-age-gate__btn:focus-visible {
	outline: 2px solid rgba(193, 154, 107, 0.9);
	outline-offset: 3px;
}

/* ── Button: YES — primary ───────────────────────────────────────────────── */
.bb-age-gate__btn--yes {
	background-color: #f0ebe3;
	color: #0e0705;
	border-color: #f0ebe3;
}

.bb-age-gate__btn--yes:hover,
.bb-age-gate__btn--yes:focus-visible {
	background-color: rgba(193, 154, 107, 0.12);
	color: #f0ebe3;
	border-color: rgba(193, 154, 107, 0.45);
}

/* ── Button: NO — ghost ──────────────────────────────────────────────────── */
.bb-age-gate__btn--no {
	background-color: transparent;
	/* 0.50 alpha over #0e0705 ≈ rgb(127,121,116) → ~4.65:1 contrast (WCAG AA pass) */
	color: rgba(240, 235, 227, 0.50);
	border-color: transparent;
	min-height: 44px;
}

.bb-age-gate__btn--no:hover,
.bb-age-gate__btn--no:focus-visible {
	color: rgba(240, 235, 227, 0.65);
	border-color: rgba(240, 235, 227, 0.12);
	background-color: transparent;
}

/* ── Active press feedback ───────────────────────────────────────────────── */
.bb-age-gate__btn:active {
	opacity: 0.8;
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.bb-age-gate,
	.bb-age-gate__dialog {
		transition: none;
	}
}
