/*
 * Age & Compliance Gate.
 *
 * Colours come from the three tokens the plugin prints in <head>, so the
 * settings screen drives everything without editing this file.
 */

.acg {
	display: grid;
	place-items: center;
	padding: clamp(1rem, 4vw, 2.5rem);
	background: var(--acg-bg, #0F1219);
	color: var(--acg-text, #fff);
	overflow-y: auto;
	font-family: inherit;
	line-height: 1.5;
}

.acg__inner {
	display: grid;
	justify-items: center;
	gap: 1.5rem;
	width: 100%;
	max-width: 34rem;
	text-align: center;
}

.acg__logo {
	max-height: 72px;
	width: auto;
	height: auto;
}

.acg__card {
	width: 100%;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.05);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	text-align: start;
}

.acg__eyebrow {
	display: inline-block;
	margin-bottom: 1rem;
	padding-block: 0.45rem;
	padding-inline: 0.9rem calc(0.9rem - 0.14em);
	border-radius: 999px;
	background: var(--acg-accent, #1A6FE8);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	line-height: 1.25;
	text-transform: uppercase;
}

.acg__title {
	margin: 0 0 0.6rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.15;
	color: inherit;
}

.acg__intro {
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	opacity: 0.78;
}

/* Whole row is a hit target — a 13px checkbox is not one. */
.acg__check {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.9rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	font-size: 0.875rem;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.acg__check:hover {
	border-color: var(--acg-accent, #1A6FE8);
	background: rgba(255, 255, 255, 0.07);
}

.acg__check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--acg-accent, #1A6FE8);
	cursor: pointer;
}

.acg__check span {
	flex: 1;
}

.acg__check strong {
	font-weight: 700;
}

.acg__submit {
	width: 100%;
	margin-top: 0.5rem;
	padding: 1rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--acg-accent, #1A6FE8);
	color: #fff;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.acg__submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.acg__submit:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.acg__submit:focus-visible,
.acg__check input:focus-visible,
.acg__exit a:focus-visible {
	outline: 2px solid var(--acg-accent, #1A6FE8);
	outline-offset: 3px;
}

.acg__fine {
	margin: 1.25rem 0 0;
	font-size: 0.75rem;
	line-height: 1.6;
	opacity: 0.6;
}

.acg__exit {
	margin: 0;
	font-size: 0.8125rem;
}

.acg__exit a {
	color: inherit;
	opacity: 0.7;
	text-decoration: underline;
}

.acg__exit a:hover {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.acg,
	.acg__submit,
	.acg__check {
		transition: none;
	}
}

/* ── theme-override hardening ──────────────────────────────────────────
 *
 * The overlay is injected into the theme's own document, so the theme's
 * stylesheet applies to everything inside it. Elementor's Global Kit styles
 * headings, links, paragraphs and buttons with a body-class-scoped selector
 * such as `.elementor-kit-123 h2` — specificity (0,1,1), which BEATS a bare
 * `.acg__title` at (0,1,0). `color: inherit` then resolves to the theme's
 * heading colour rather than the gate's.
 *
 * On a dark gate with a dark brand heading colour that renders the title
 * invisible, which is exactly what it did on Alpha Wolf Labs: a near-black
 * #0F1219 "Before You Enter" on a near-black panel.
 *
 * So every colour inside the overlay is stated explicitly at (0,2,0) or
 * higher instead of inherited. `-webkit-text-fill-color` is reset alongside
 * it because a theme using gradient text paints straight over `color`.
 */
.acg .acg__title,
.acg .acg__intro,
.acg .acg__check,
.acg .acg__check span,
.acg .acg__check strong,
.acg .acg__fine,
.acg .acg__exit,
.acg .acg__exit a {
	color: var(--acg-text, #fff);
	-webkit-text-fill-color: currentColor;
}

/* The two filled elements keep white labels regardless of the theme's own
 * button and link colours. */
.acg .acg__eyebrow,
.acg .acg__submit {
	color: #fff;
	-webkit-text-fill-color: #fff;
}

/* Themes commonly set `text-decoration` and `background` on buttons and
 * links; neither belongs on the gate's own controls. */
.acg .acg__submit {
	background: var(--acg-accent, #1A6FE8);
	text-decoration: none;
}

.acg .acg__exit a {
	text-decoration: underline;
}

/* A theme heading rule can also carry its own margin, weight and family. */
.acg .acg__title {
	margin: 0 0 0.6rem;
	font-weight: 800;
	font-family: inherit;
	letter-spacing: -0.01em;
}

/* ── brand tint ────────────────────────────────────────────────────────
 *
 * The neutral white-alpha panel reads grey against a brand whose dark is a
 * blue-black. Tinting the panel and its border toward the accent keeps the
 * gate looking like the site it is guarding rather than a generic overlay.
 */
.acg__card {
	border-color: color-mix(in srgb, var(--acg-accent, #1A6FE8) 26%, transparent);
	background:
		linear-gradient(
			160deg,
			color-mix(in srgb, var(--acg-accent, #1A6FE8) 9%, transparent) 0%,
			rgba(255, 255, 255, 0.04) 58%
		);
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
}

/* `color-mix` is ~2023 in Safari/Firefox. Older engines skip the two
 * declarations above and keep the neutral panel from the base rule, which is
 * a slightly plainer card rather than a broken one. */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
	.acg__card {
		border-color: rgba(255, 255, 255, 0.14);
		background: rgba(255, 255, 255, 0.05);
	}
}

/* Centred grid content taller than the viewport is unreachable in the
 * scroll direction — the decline link is what falls off the bottom. */
.acg {
	align-content: safe center;
	justify-content: safe center;
}
