/*
 * King of Kentucky — age gate (bf-wp-forms) additive styles.
 *
 * Loaded by the plugin as `bf-wp-forms/css/extra.css` (see plugin readme,
 * "Styling the Plugin"), on top of the plugin defaults. Restyles the age gate
 * to the DS red band: a single centred column — crest, verify form, then the
 * legal footer.
 *
 * Red `#A95B5C` is one of the grounds reserved for the age gate; every text
 * role on it is white. Square corners, 1px hairlines, no shadow or glass.
 */

/* Lock the page behind the gate (the plugin adds `html.agegate`). */


/* ---- Cover + single-column shell ---------------------------------------- */
#bfwpf-agegate__agegate-outer.bfwpf-agegate__cover {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	/* Plugin sets `overflow: hidden !important`; the cover must scroll so the
	   legal footer is reachable on short viewports. */
	overflow-x: hidden !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--kok-red-500, #A95B5C);
	color: #fff;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: 1fr auto;
	grid-template-areas:
		"form"
		"footer";
	gap: clamp(20px, 4vw, 48px);
	padding: clamp(20px, 4vw, 48px);
	box-sizing: border-box;
	z-index: 100000;
}

/* `__main` wraps the form and legal footer; flatten it so both take part in
   the outer grid directly (form centred, footer beneath). */
.bfwpf-agegate__cover .bfwpf-agegate-container__main { display: contents; }
.bfwpf-agegate__cover .bfwpf-agegate-container__before,
.bfwpf-agegate__cover .bfwpf-agegate-container__after { display: none; }

/* Crest, heading, form. */
.bfwpf-agegate__cover .bfwpf-agegate-container__inner {
	grid-area: form;
	align-self: center;
	justify-self: center;
	width: 100%;
	max-width: 440px;
	display: grid;
	gap: var(--space-6, 24px);
}

/* ---- Crest lockup + heading -------------------------------------------- */
.bfwpf-agegate__cover .bfwpf-agegate-copy-outer {
	display: grid;
	justify-items: center;
	gap: var(--space-5, 20px);
	text-align: center;
}
.bfwpf-agegate__cover .bfwpf-agegate-copy-outer::before {
	content: "";
	width: 232px;
	max-width: 70%;
	aspect-ratio: 232 / 150;
	background: url("../../assets/img/logo/king-of-kentucky-lockup.png") center / contain no-repeat;
}
.bfwpf-agegate__cover .bfwpf-agegate-copy-outer p {
	margin: 0;
	font-family: var(--font-sans, "Archivo", sans-serif);
	font-weight: 700;
	font-size: clamp(var(--fs-500), 2.2vw, var(--fs-600));
	line-height: 1.2;
	letter-spacing: var(--ls-button, .14em);
	text-transform: uppercase;
	color: #fff;
}

/* ---- Form scaffolding --------------------------------------------------- */
.bfwpf-agegate__cover #agegate_form {
	display: grid;
	gap: var(--space-5, 20px);
	text-align: left;
}
.bfwpf-agegate__cover .bfwpf-form-control-container { width: 100%; }

/* Field group labels: small uppercase Archivo. */
.bfwpf-agegate__cover .bfwpf-fieldset-legend,
.bfwpf-agegate__cover .bfwpf-age-gate-country__wrapper > label {
	font-family: var(--font-sans, "Archivo", sans-serif);
	font-weight: 600;
	font-size: var(--fs-200);
	letter-spacing: var(--ls-nav, .16em);
	text-transform: uppercase;
	color: rgba(255, 255, 255, .82);
	margin: 0 0 var(--space-3, 12px);
	padding: 0;
}

/* Birthdate row — three equal boxes (MM / DD / YYYY). */
.bfwpf-agegate__cover fieldset.bfwpf-lda-input {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3, 12px);
	border: 0;
	margin: 0;
	padding: 0;
}
.bfwpf-agegate__cover .bfwpf-birthdate-input-field-wrapper {
	flex: 1 1 0;
	min-width: 0;
}
/* Per-field labels are redundant with the placeholders in this layout. */
.bfwpf-agegate__cover .bfwpf-birthdate-input-field-wrapper label {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Inputs + select — transparent fields, hairline border, white text. */
.bfwpf-agegate__cover input[type="text"],
.bfwpf-agegate__cover input[type="tel"],
.bfwpf-agegate__cover input[type="number"],
.bfwpf-agegate__cover .bfwpf-birthdate-input-field-wrapper input,
.bfwpf-agegate__cover select#country {
	box-sizing: border-box;
	width: 100%;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 0;
	padding: 13px 14px;
	color: #fff;
	font-family: var(--font-sans, "Archivo", sans-serif);
	font-size: var(--fs-300);
	letter-spacing: .02em;
	transition: border-color var(--dur-fast, 160ms) var(--ease-standard, ease),
		background-color var(--dur-fast, 160ms) var(--ease-standard, ease);
}
.bfwpf-agegate__cover ::placeholder { color: rgba(255, 255, 255, .6); opacity: 1; }
.bfwpf-agegate__cover input:hover,
.bfwpf-agegate__cover select#country:hover { border-color: rgba(255, 255, 255, .75); }
.bfwpf-agegate__cover input:focus,
.bfwpf-agegate__cover select#country:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
	border-color: #fff;
	background: rgba(255, 255, 255, .12);
}

/* Native select chevron (down chevron, white). */
.bfwpf-agegate__cover select#country {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 42px;
}
.bfwpf-agegate__cover select#country option { color: #1c1c1c; }

/* Remember me. */
.bfwpf-agegate__cover .bfwpf-age-gate-remember-wrapper { width: 100%; }
.bfwpf-agegate__cover .age-gate-remember-label {
	display: flex;
	align-items: center;
	gap: var(--space-2, 8px);
	font-family: var(--font-sans, "Archivo", sans-serif);
	font-size: var(--fs-300);
	color: #fff;
	cursor: pointer;
}
.bfwpf-agegate__cover .age-gate-remember-label input[type="checkbox"] {
	width: 16px; height: 16px;
	accent-color: #fff;
	cursor: pointer;
}

/* Cookie / terms copy under the form. */
.bfwpf-agegate__cover .bfwpf-agegate-copy-under-form {
	font-family: var(--font-sans, "Archivo", sans-serif);
	font-size: var(--fs-200);
	line-height: 1.55;
	color: rgba(255, 255, 255, .82);
}
.bfwpf-agegate__cover .bfwpf-agegate-copy-under-form p { margin: 0; }
.bfwpf-agegate__cover .bfwpf-agegate-copy-under-form a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---- Submit — outlined DS button, inverts on hover --------------------- */
.bfwpf-agegate__cover .age-gate-submit-wrapper {
	margin-top: var(--space-2, 8px);
	display: flex;
	justify-content: center;
}
.bfwpf-agegate__cover #btn_submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 34px;
	background: transparent;
	border: 1px solid #fff;
	border-radius: 0;
	color: #fff;
	font-family: var(--font-sans, "Archivo", sans-serif);
	font-weight: 600;
	font-size: var(--fs-200);
	letter-spacing: var(--ls-button, .14em);
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--dur-fast, 160ms) var(--ease-standard, ease),
		color var(--dur-fast, 160ms) var(--ease-standard, ease);
}
.bfwpf-agegate__cover #btn_submit:hover {
	background: #fff;
	color: var(--kok-red-600, #8E4749);
}
.bfwpf-agegate__cover #btn_submit:active { transform: scale(.97); }
.bfwpf-agegate__cover #btn_submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Validation error text stays legible on red. */
.bfwpf-agegate__cover .bfwpf-lda-error-msg,
.bfwpf-agegate__cover #lda_error_msg,
.bfwpf-agegate__cover .bfwpf-error-container { color: #ffdede; }

/* ---- Legal footer — beneath the form ----------------------------------- */
/* Typography matches the site footer: see `.bfwpf-agegate__cover
   .bfwpf-legal-footer*` alongside `.kok-footer-legal` in assets/css/style.css.
   Only the placement and divider are specific to the gate. */
.bfwpf-agegate__cover .bfwpf-legal-footer {
	grid-area: footer;
	align-self: end;
	justify-self: center;
	width: 100%;
	text-align: center;
	color: #fff;
	margin: 0 auto;
	padding-top: var(--space-4, 40px);
	border-top: 1px solid rgba(255, 255, 255, .28);
}
