/*
 * Age gate (src/Modules/AgeGate.php): a near-solid glass card over the blurred, dimmed page, with the theme's 18+ tag (11° slant, as
 * the bars in the logo). Theme tokens with fallbacks, so it also works without the best-market theme, and follows
 * its dark theme on its own.
 */
@keyframes bm-age-in { from { opacity: 0; } }
@keyframes bm-age-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.bm-age {
	/* Under the Complianz cookie banner (99999): consent comes first. */
	position: fixed; inset: 0; z-index: 99990; display: grid; place-items: center; padding: 1rem;
	background: rgb(20 17 18 / .5); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
	animation: bm-age-in 240ms ease;
}
.bm-age-ok .bm-age { display: none; }
html:not(.bm-age-ok):has(.bm-age) { overflow: hidden; }

.bm-age__card {
	box-sizing: border-box; width: min(100%, 27rem); padding: 2rem 1.5rem 1.5rem; text-align: center;
	border-radius: var(--wp--custom--radius--lg, 24px); color: var(--wp--preset--color--ink, #231F20);
	background:
		radial-gradient(20rem 9rem at 50% -2rem, rgb(193 2 48 / .16), transparent 70%),
		color-mix(in srgb, var(--wp--preset--color--paper, #fff) 94%, transparent);
	-webkit-backdrop-filter: var(--wp--custom--glass--blur, blur(20px)); backdrop-filter: var(--wp--custom--glass--blur, blur(20px));
	box-shadow: inset 0 0 0 1px var(--wp--custom--glass--rim, rgb(255 255 255 / .6)), 0 30px 60px -28px rgb(0 0 0 / .55);
	animation: bm-age-pop 320ms cubic-bezier(.2, .7, .2, 1);
}
.bm-age__card > * { margin: 0; }

.bm-age__badge {
	display: inline-grid; place-items: center; min-width: 4.75rem; height: 3rem; padding: 0 .75rem; box-sizing: border-box;
	border-radius: 4px; background: var(--wp--preset--color--crimson, #C10230); color: var(--wp--preset--color--white, #fff);
	transform: skewX(-11deg); box-shadow: 0 12px 24px -12px rgb(193 2 48 / .7);
}
.bm-age__badge span { transform: skewX(11deg); font-size: 1.5rem; font-weight: 900; letter-spacing: -.02em; line-height: 1; }

.bm-age__title {
	margin-top: 1.25rem; font-size: var(--wp--preset--font-size--xl, 1.75rem); font-weight: 800; line-height: 1.1;
	letter-spacing: -.025em; color: inherit;
}
.bm-age__text { margin-top: .75rem; color: var(--wp--preset--color--ink-soft, #5C5657); text-wrap: pretty; }

/* Side by side when both labels fit on one line, otherwise stacked full width (longer uk/ru labels). */
.bm-age__actions { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.5rem; }
.bm-age__actions a {
	flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.25rem; box-sizing: border-box;
	white-space: nowrap;
	border-radius: var(--wp--custom--radius--pill, 999px); font-weight: 700; line-height: 1.2; text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease;
}
.bm-age a.bm-age__yes { background: var(--wp--preset--color--crimson, #C10230); color: var(--wp--preset--color--white, #fff); }
.bm-age a.bm-age__yes:hover { background: var(--wp--preset--color--crimson-deep, #8E0122); }
.bm-age a.bm-age__no { border: 2px solid var(--wp--preset--color--line-strong, #CBCBD0); color: var(--wp--preset--color--ink, #231F20); }
.bm-age a.bm-age__no:hover { border-color: var(--wp--preset--color--ink, #231F20); }
.bm-age__actions a:focus-visible { outline: 3px solid var(--wp--preset--color--ink, #231F20); outline-offset: 2px; }

.bm-age__note { margin-top: 1rem; font-size: var(--wp--preset--font-size--xs, .8125rem); line-height: 1.45; color: var(--wp--preset--color--ink-soft, #5C5657); }

@media (min-width: 480px) {
	.bm-age__card { width: min(100%, 31rem); padding: 2.5rem 2rem 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
	.bm-age, .bm-age__card { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
	.bm-age { background: rgb(20 17 18 / .85); -webkit-backdrop-filter: none; backdrop-filter: none; }
	.bm-age__card { background: var(--wp--preset--color--paper, #fff); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
