/*
 * Age Gate (plugin) styled to the mockup's .gate (round 12). Stacking: header.css reserves 2147482000
 * for the gate, below the nicotine warning (2147483000), which stays visible above it.
 */
html.age-gate__restricted,
html.age-gate__restricted body {
	overflow: hidden;
}

/* The warning bar is normally in the page flow; pin it while the gate is open so scrolling never hides it. */
html.age-gate__restricted body .tv-warning {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
}

html.age-gate__restricted body.admin-bar .tv-warning {
	top: var(--wp-admin--admin-bar--height, 32px);
}

html body .age-gate__wrapper,
html body .age-gate-wrapper {
	z-index: 2147482000;
	display: grid;
	place-items: center;
	padding: 84px 24px 24px;
	background: transparent;
	text-align: center;
}

html body :is(.age-gate__background-color, .age-gate-background-color) {
	background: #000000;
	opacity: 0.93;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

html body :is(.age-gate__loader, .age-gate-loader) {
	color: var(--gold);
}

html body .age-gate__wrapper > .age-gate,
html body .age-gate-wrapper > .age-gate {
	max-width: 520px;
	margin: 0;
	padding: 46px 40px;
	border: 1px solid var(--line);
	border-top: 5px solid var(--red);
	border-radius: 0;
	background: var(--panel);
	color: var(--bone);
	font-family: var(--body);
}

/* Eyebrow (plugin "heading"). */
html body .age-gate :is(.age-gate__heading, .age-gate-heading) {
	margin: 0;
}

html body .age-gate :is(.age-gate__heading-title, .age-gate-heading-title) {
	margin: 0;
	color: var(--gold);
	font-family: var(--mono);
	font-size: var(--fs-eyebrow);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-eyebrow);
	line-height: 1.4;
	text-transform: uppercase;
}

html body .age-gate :is(.age-gate__heading-title, .age-gate-heading-title)::before {
	content: "";
	display: inline-block;
	width: 28px;
	height: 2px;
	margin-right: 12px;
	background: var(--red);
	vertical-align: middle;
}

html body .age-gate :is(.age-gate__headline, .age-gate-headline) {
	margin: 14px 0;
	color: var(--bone);
	font-family: var(--font-display);
	font-size: clamp(46px, 12vw, 74px);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-display);
	line-height: 0.95;
	text-transform: uppercase;
}

html body .age-gate :is(.age-gate__headline, .age-gate-headline) em {
	color: var(--red);
	font-style: normal;
}

html body .age-gate :is(.age-gate__subheadline, .age-gate-subheadline) {
	margin: 0 0 26px;
	color: var(--mute);
	font-size: 14px;
	line-height: 1.6;
}

/* Not in the mockup: the challenge line is empty, and "remember" is always on (30 days). */
html body .age-gate :is(.age-gate__challenge, .age-gate-challenge, .age-gate__remember-wrapper, .age-gate-remember-wrapper) {
	display: none;
}

html body .age-gate :is(.age-gate__buttons, .age-gate-buttons) {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin: 0;
}

html body .age-gate :is(.age-gate__submit--yes, .age-gate__submit--no, .age-gate-submit-yes, .age-gate-submit-no) {
	min-height: 52px;
	margin: 0;
	padding: 15px 28px;
	border: 0;
	border-radius: 0;
	font-family: var(--body);
	font-size: var(--fs-small);
	font-weight: var(--fw-black);
	letter-spacing: var(--ls-button);
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
}

html body .age-gate :is(.age-gate__submit--yes, .age-gate-submit-yes),
html body .age-gate :is(.age-gate__submit--yes, .age-gate-submit-yes):is(:hover, :focus, :active) {
	background: var(--red);
	color: var(--on-red);
	clip-path: none;
}

html body .age-gate :is(.age-gate__submit--yes, .age-gate-submit-yes):hover {
	background: var(--red-hover);
}

html body .age-gate :is(.age-gate__submit--no, .age-gate-submit-no),
html body .age-gate :is(.age-gate__submit--no, .age-gate-submit-no):is(:focus, :active) {
	border: 2px solid var(--bone);
	background: transparent;
	color: var(--bone);
	clip-path: none;
}

html body .age-gate :is(.age-gate__submit--no, .age-gate-submit-no):hover {
	border: 2px solid var(--bone);
	background: var(--bone);
	color: var(--ink);
}

html body .age-gate button:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
}

/* "No" answer. */
html body .age-gate :is(.age-gate__errors, .age-gate-errors):empty {
	display: none;
}

/* The page behind is removed from view, keyboard and screen readers; the gate and the warning stay. */
html.age-gate__restricted body:has(.age-gate :is(.age-gate__error, .age-gate-error)) > *:not(.age-gate__wrapper, .age-gate-wrapper, .tv-warning),
html.age-gate__restricted body:has(.age-gate :is(.age-gate__error, .age-gate-error)) > *:not(.age-gate__wrapper, .age-gate-wrapper, .tv-warning) * {
	visibility: hidden !important;
}

html body .age-gate :is(.age-gate__errors, .age-gate-errors) {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

html body .age-gate :is(.age-gate__error, .age-gate-error) {
	margin: 20px 0 0;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-left: 4px solid var(--red);
	background: var(--canvas);
	color: var(--bone);
	font-size: 16px;
	font-weight: var(--fw-bold);
	line-height: 1.5;
}

@media (max-width: 560px) {
	html body .age-gate__wrapper > .age-gate,
	html body .age-gate-wrapper > .age-gate {
		padding: 34px 22px;
	}

	html body .age-gate :is(.age-gate__submit--yes, .age-gate__submit--no, .age-gate-submit-yes, .age-gate-submit-no) {
		width: 100%;
	}
}
