/* ==========================================================================
   Waterford Whiskey — age gate + cookie consent overlays
   ========================================================================== */

:root {
	--wwhiskey-ink:    #141414;
	--wwhiskey-ink-2:  #4A4A46;
	--wwhiskey-stone:  #F4F1EA;
	--wwhiskey-cream:  #DCDCD3;
	--wwhiskey-blue:   #1E22AA;
	--wwhiskey-blue-2: #15187F;
	--wwhiskey-shadow: 0 18px 60px rgba(10, 12, 40, 0.35);
}

/* When the age gate is open we prevent any scrolling of the page behind it. */
html.wwhiskey-locked,
html.wwhiskey-locked body {
	overflow: hidden !important;
}

/* CRITICAL: respect the HTML `hidden` attribute. Our base rules below set
   `display: flex` on the age gate, which has the same specificity as the
   UA stylesheet's `[hidden] { display: none }` and would otherwise win and
   leave an invisible, full-viewport, click-eating layer in place. */
.wwhiskey-age-gate[hidden],
.wwhiskey-consent[hidden] {
	display: none !important;
}

/* Defense in depth: when the age gate is not actively open, don't let it
   intercept clicks even if some other stylesheet unexpectedly reveals it. */
.wwhiskey-age-gate:not(.is-open) { pointer-events: none; }
.wwhiskey-age-gate.is-open       { pointer-events: auto; }

/* -------- Shared button styles -------- */
.wwhiskey-btn {
	font: inherit;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.9rem 1.6rem;
	border: 1px solid transparent;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
	line-height: 1;
}
.wwhiskey-btn--primary {
	background: var(--wwhiskey-cream);
	color: var(--wwhiskey-blue);
	border-color: var(--wwhiskey-cream);
}
.wwhiskey-btn--primary:hover,
.wwhiskey-btn--primary:focus-visible {
	background: #fff;
	border-color: #fff;
	outline: none;
}
.wwhiskey-btn--ghost {
	background: transparent;
	color: var(--wwhiskey-cream);
	border-color: rgba(220, 220, 211, 0.45);
}
.wwhiskey-btn--ghost:hover,
.wwhiskey-btn--ghost:focus-visible {
	border-color: var(--wwhiskey-cream);
	outline: none;
}
.wwhiskey-btn--link {
	background: transparent;
	color: var(--wwhiskey-cream);
	border-color: transparent;
	padding-left: 0.25rem;
	padding-right: 0.25rem;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* -------- Age gate -------- */
.wwhiskey-age-gate {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: radial-gradient(ellipse at center, #1E22AA 0%, #0D0F55 75%);
	color: var(--wwhiskey-cream);
	opacity: 0;
	transition: opacity 250ms ease;
}
.wwhiskey-age-gate.is-open {
	opacity: 1;
}
.wwhiskey-overlay__panel {
	max-width: 560px;
	width: 100%;
	text-align: center;
}
.wwhiskey-overlay__logo {
	margin: 0 auto 3rem;
	max-width: 280px;
}
.wwhiskey-overlay__logo svg {
	width: 100%;
	height: auto;
	display: block;
}
.wwhiskey-overlay__title {
	font-family: "Cormorant Garamond", Garamond, serif;
	font-weight: 400;
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	line-height: 1.15;
	margin: 0 0 0.75rem;
	color: var(--wwhiskey-cream);
}
.wwhiskey-overlay__body {
	font-size: 1rem;
	margin: 0 0 2rem;
	color: rgba(220, 220, 211, 0.85);
}
.wwhiskey-overlay__actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
}
.wwhiskey-overlay__note {
	margin-top: 2.5rem;
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(220, 220, 211, 0.55);
}
.wwhiskey-overlay__denied {
	margin-top: 1.5rem;
	font-size: 0.95rem;
	color: var(--wwhiskey-cream);
}

/* -------- Cookie consent -------- */
.wwhiskey-consent {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	z-index: 999998;
	max-width: 760px;
	margin-left: auto;
	background: var(--wwhiskey-ink);
	color: var(--wwhiskey-cream);
	box-shadow: var(--wwhiskey-shadow);
	transform: translateY(calc(100% + 2rem));
	transition: transform 280ms ease;
	border-top: 3px solid var(--wwhiskey-blue);
	pointer-events: auto;
}
/* Make sure buttons inside the banner always receive clicks, even if a
   parent theme accidentally sets pointer-events: none somewhere up-tree. */
.wwhiskey-consent * { pointer-events: auto; }
.wwhiskey-consent.is-open {
	transform: translateY(0);
}
.wwhiskey-consent__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	padding: 1.25rem 1.5rem;
}
@media (min-width: 780px) {
	.wwhiskey-consent__inner {
		grid-template-columns: 1fr auto;
		align-items: center;
	}
}
.wwhiskey-consent__title {
	font-family: "Cormorant Garamond", Garamond, serif;
	font-weight: 500;
	font-size: 1.3rem;
	margin: 0 0 0.35rem;
	color: var(--wwhiskey-cream);
}
.wwhiskey-consent__body {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.5;
	color: rgba(220, 220, 211, 0.8);
}
.wwhiskey-consent__actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	align-items: center;
}
.wwhiskey-consent__prefs {
	padding: 0 1.5rem 1.5rem;
	border-top: 1px solid rgba(220, 220, 211, 0.12);
	margin-top: 0;
}
.wwhiskey-consent__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid rgba(220, 220, 211, 0.08);
}
.wwhiskey-consent__row:last-of-type {
	border-bottom: 0;
}
.wwhiskey-consent__row strong {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
}
.wwhiskey-consent__row em {
	display: block;
	font-style: normal;
	font-size: 0.82rem;
	color: rgba(220, 220, 211, 0.65);
	margin-top: 0.15rem;
}
.wwhiskey-consent__row input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.3rem;
	accent-color: var(--wwhiskey-blue);
	flex-shrink: 0;
}
.wwhiskey-consent__prefs-actions {
	padding-top: 1rem;
	display: flex;
	justify-content: flex-end;
}

/* Reduce motion friendliness */
@media (prefers-reduced-motion: reduce) {
	.wwhiskey-age-gate,
	.wwhiskey-consent { transition: none !important; }
}
