/*
 * 18+ age window (2026-10-12). Loaded together with assets/age-gate.js.
 *
 * The window is added to the page by the script, so these rules do nothing
 * until it is shown. Colours are the variables in the first block: change
 * them there. z-index is above everything on the site, including the cookie
 * banner (999999 in cookies-and-content-security-policy), so the age question
 * always comes first and the cookie banner can be used after "Da".
 */

.ahs-ag {
	--ahs-ag-backdrop: rgba(0, 0, 0, 0.88);
	--ahs-ag-bg: #ffffff;
	--ahs-ag-text: #1a1a1a;
	--ahs-ag-muted: #555555;
	--ahs-ag-accent: #2e7d32;
	--ahs-ag-accent-text: #ffffff;
	--ahs-ag-focus: #1a1a1a;

	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483000;
	display: flex;
	padding: 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--ahs-ag-backdrop);
	box-sizing: border-box;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.ahs-ag *,
.ahs-ag *::before,
.ahs-ag *::after {
	box-sizing: border-box;
}

/* "margin: auto" centres the box and still lets it scroll on short screens. */
.ahs-ag .ahs-ag__box {
	margin: auto;
	width: 100%;
	max-width: 30rem;
	padding: 28px 24px 22px;
	border-radius: 10px;
	background: var(--ahs-ag-bg);
	color: var(--ahs-ag-text);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.ahs-ag .ahs-ag__title {
	width: auto;
	margin: 0 0 12px;
	padding: 0;
	color: var(--ahs-ag-text);
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
}

.ahs-ag .ahs-ag__title:focus {
	outline: none; /* focused by the script only, not reachable with Tab */
}

.ahs-ag .ahs-ag__text p {
	margin: 0 0 10px;
	color: var(--ahs-ag-text);
	font-size: 1rem;
}

.ahs-ag .ahs-ag__actions {
	display: flex;
	flex-direction: column;
	margin: 18px 0 0;
}

.ahs-ag .ahs-ag__actions > .ahs-ag__btn + .ahs-ag__btn {
	margin-top: 10px;
}

/* Overrides Flatsome's general button/link styles (uppercase, margins, ...). */
.ahs-ag .ahs-ag__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	min-height: 48px;
	margin: 0;
	padding: 10px 16px;
	border: 2px solid var(--ahs-ag-text);
	border-radius: 6px;
	background: var(--ahs-ag-bg);
	color: var(--ahs-ag-text);
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	transition: none;
}

.ahs-ag .ahs-ag__btn--yes {
	border-color: var(--ahs-ag-accent);
	background: var(--ahs-ag-accent);
	color: var(--ahs-ag-accent-text);
}

.ahs-ag .ahs-ag__btn:hover {
	opacity: 0.9;
	color: inherit;
}

.ahs-ag .ahs-ag__btn--yes:hover {
	color: var(--ahs-ag-accent-text);
}

.ahs-ag .ahs-ag__btn:focus {
	outline: 3px solid var(--ahs-ag-focus);
	outline-offset: 3px;
}

.ahs-ag .ahs-ag__btn:focus:not(:focus-visible) {
	outline: none;
}

.ahs-ag .ahs-ag__note {
	margin: 14px 0 0;
	color: var(--ahs-ag-muted);
	font-size: 0.875rem;
}

/* Links to the legal pages (those pages open without the window). */
.ahs-ag .ahs-ag__links {
	margin: 10px 0 0;
	font-size: 0.875rem;
}

.ahs-ag .ahs-ag__links a {
	display: inline-block;
	margin: 0 14px 0 0;
	padding: 4px 0;
	color: var(--ahs-ag-muted);
	text-decoration: underline;
}

.ahs-ag .ahs-ag__links a:hover,
.ahs-ag .ahs-ag__links a:focus {
	color: var(--ahs-ag-text);
}

.ahs-ag .ahs-ag__links a:focus-visible {
	outline: 3px solid var(--ahs-ag-focus);
	outline-offset: 2px;
}

/* Wider screens: buttons side by side, "Da" first. */
@media (min-width: 520px) {
	.ahs-ag .ahs-ag__actions {
		flex-direction: row;
	}

	.ahs-ag .ahs-ag__btn {
		flex: 1 1 auto;
		width: auto;
	}

	.ahs-ag .ahs-ag__actions > .ahs-ag__btn + .ahs-ag__btn {
		margin-top: 0;
		margin-left: 10px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ahs-ag {
		animation: ahs-ag-fade 0.2s ease-out;
	}
}

@keyframes ahs-ag-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* No scrolling of the page behind the window. */
html.ahs-ag-open,
html.ahs-ag-open body {
	overflow: hidden;
}

/* Printing a page (e.g. the Terms) is never blocked by the window. */
@media print {
	.ahs-ag {
		display: none;
	}

	html.ahs-ag-open,
	html.ahs-ag-open body {
		overflow: visible;
	}
}
