/**
 * 18+ verification popup.
 *
 * Self-contained so it renders correctly regardless of what the compiled
 * Tailwind build happens to include. Same design language as the rest of the
 * theme: black and white, Poppins headings, Montserrat body, squared corners.
 */

.sg-age-gate {
	--sg-line: rgba(0, 0, 0, 0.12);
	--sg-muted: rgba(0, 0, 0, 0.6);

	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	font-family: 'Montserrat', system-ui, sans-serif;
}

.sg-age-gate[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ *
 * Backdrop
 * ------------------------------------------------------------------ */
.sg-age-gate__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

/* ------------------------------------------------------------------ *
 * Panel
 * ------------------------------------------------------------------ */
.sg-age-gate__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 40rem;
	max-height: calc(100vh - 2.5rem);
	overflow-y: auto;
	background: #fff;
	border: 1px solid #000;
	box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.6);
	animation: sg-age-in 0.22s ease-out;
}

@keyframes sg-age-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ------------------------------------------------------------------ *
 * Head
 * ------------------------------------------------------------------ */
.sg-age-gate__head {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	background: #000;
	padding: 1.5rem 1.75rem;
}

.sg-age-gate__badge {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: #fff;
}

.sg-age-gate__title {
	margin: 0;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.2;
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * Body
 * ------------------------------------------------------------------ */
.sg-age-gate__body {
	padding: 1.75rem;
}

.sg-age-gate__intro {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--sg-muted);
}

.sg-age-gate__terms {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--sg-line);
}

.sg-age-gate__terms-title {
	margin: 0 0 0.75rem;
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: #000;
}

.sg-age-gate__terms-lead {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: #000;
}

.sg-age-gate__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.75rem;
}

.sg-age-gate__list li {
	position: relative;
	padding-left: 1.6rem;
	font-size: 0.85rem;
	line-height: 1.65;
	color: var(--sg-muted);
}

/* Tick marker, drawn rather than an icon font. */
.sg-age-gate__list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 0.7rem;
	height: 0.38rem;
	border-left: 1.5px solid #000;
	border-bottom: 1.5px solid #000;
	transform: rotate(-45deg);
}

.sg-age-gate__list a {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ *
 * Actions
 * ------------------------------------------------------------------ */
.sg-age-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0 1.75rem;
}

@media (min-width: 30rem) {
	.sg-age-gate__actions {
		flex-direction: row-reverse;
	}

	.sg-age-gate__confirm,
	.sg-age-gate__decline {
		flex: 1;
	}
}

.sg-age-gate__confirm,
.sg-age-gate__decline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	line-height: 1.2;
	padding: 1.05rem 1.5rem;
	border: 1px solid #000;
	border-radius: 0;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.sg-age-gate__confirm {
	background: #000;
	color: #fff;
}

.sg-age-gate__confirm:hover {
	background: rgba(0, 0, 0, 0.85);
}

.sg-age-gate__decline {
	background: #fff;
	color: #000;
}

.sg-age-gate__decline:hover {
	background: #000;
	color: #fff;
}

.sg-age-gate__confirm:focus-visible,
.sg-age-gate__decline:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ *
 * Footnote
 * ------------------------------------------------------------------ */
.sg-age-gate__note {
	margin: 0;
	padding: 1rem 1.75rem 1.75rem;
	font-size: 0.7rem;
	line-height: 1.6;
	text-align: center;
	color: rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------------ *
 * Small screens
 * ------------------------------------------------------------------ */
@media (max-width: 30rem) {
	.sg-age-gate {
		padding: 0.75rem;
	}

	.sg-age-gate__head,
	.sg-age-gate__body {
		padding: 1.25rem;
	}

	.sg-age-gate__actions {
		padding: 0 1.25rem;
	}

	.sg-age-gate__note {
		padding: 0.9rem 1.25rem 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sg-age-gate__panel {
		animation: none;
	}
}
