/**
 * Age gate: template-parts/ui/age-gate.php (not designed, built from the
 * tokens). The whole page under the hero's dark green, so nothing of the shop
 * shows before the answer; a cream card in the middle with the logo, Heading
 * H2, Body/L text, the Dark and Light pills, the message after "No" and the
 * legal links in Body/S. Card radius as the section cards (28 / 40), 20px
 * side padding below 768 as every box.
 *
 * Visible by default, so it is there in the first paint and without
 * JavaScript. The head script (Xativia Core) adds `xat-age-ok` to <html> when
 * the cookie exists, which hides it before it paints, or `xat-age-open`,
 * which stops the page behind from scrolling. The same script measures the
 * scrollbar width into `--scrollbar`, and the locked body keeps it as padding,
 * as the other popups do (base.css), so nothing moves when the gate closes.
 * No reserved gutter: the overlay did not cover it, which left a strip on
 * the right with classic scrollbars (Windows).
 */

.age-gate {
	position: fixed;
	z-index: 300;
	inset: 0;
	display: flex;
	overflow-y: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
	padding: var(--space-md) var(--container-gutter);
	background: var(--gradient-hero);
}

.xat-age-ok .age-gate,
.age-gate[hidden] {
	display: none;
}

.xat-age-open,
.xat-age-open body {
	overflow: hidden;
}

.xat-age-open body {
	padding-right: var(--scrollbar, 0px);
}

.age-gate__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 600px;
	margin: auto;
	padding: var(--space-lg) 20px;
	border-radius: var(--radius-section);
	background: var(--color-cream);
	color: var(--color-ink);
	text-align: center;
}

.age-gate__logo {
	width: auto;
	height: 52px;
	margin-bottom: var(--space-md);
}

.age-gate__title {
	margin: 0;
	color: var(--color-black);
	font-family: var(--font-display);
	font-size: var(--text-h2);
	font-weight: var(--weight-extrabold);
	letter-spacing: var(--tracking-h2);
	line-height: var(--leading-h2);
	text-wrap: balance;
}

.age-gate__text {
	max-width: 440px;
	margin: var(--space-sm) 0 0;
	font-size: var(--text-body-l);
	line-height: var(--leading-body-l);
	text-wrap: pretty;
}

.age-gate__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	width: 100%;
	margin-top: var(--space-lg);
}

/* "No": the Light pill's cream hover is the card colour, so it keeps a white
 * fill with the About finder pills' line border, ink on hover as there. */
.age-gate__no {
	--btn-bg-hover: var(--color-white);

	box-shadow: inset 0 0 0 1px var(--color-line);
}

.age-gate__no:hover {
	box-shadow: inset 0 0 0 1px var(--color-ink);
}

.age-gate__message {
	margin: var(--space-sm) 0 0;
	color: var(--color-orange-dark);
	font-size: var(--text-body-m);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-body-m);
}

.age-gate__message:empty {
	display: none;
}

.age-gate__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs) var(--space-md);
	justify-content: center;
	margin: var(--space-md) 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--text-body-s);
	line-height: var(--leading-body-s);
}

.age-gate__links a {
	color: var(--color-ink);
	text-decoration: underline;
}

.age-gate__links a:hover {
	color: var(--color-orange);
}

@media (min-width: 768px) {
	.age-gate__card {
		padding: 56px var(--space-xl);
	}

	.age-gate__logo {
		height: 63px;
	}
}
