/*
 * z-index 100003 is the top of a shared band across every
 * wpsmallplugins.com popup-based plugin: WPSP Discount Wheel's overlay sits at
 * 100000, WPSP Ad Blocker Alert's at 100001/100002, this one highest — matching
 * the data-wpsp-active-overlay JS precedence (WPSP Age Confirmation Screen > WPSP Ad Blocker
 * Alert > WPSP Discount Wheel) as a CSS-level backstop in case the JS
 * defer logic is ever bypassed.
 */
.wpsp-age-confirmation-screen-overlay {
	position: fixed;
	inset: 0;
	z-index: 100003;
	display: flex;
	/* The modal centres itself with auto margins: unlike align-items it never pushes the top of a tall dialog out of reach, so a phone in landscape or a zoomed page can scroll to the buttons. */
	overflow-y: auto;
	overscroll-behavior: contain;
	background: rgba( 0, 0, 0, 0.75 );
	-webkit-backdrop-filter: blur( 6px );
	backdrop-filter: blur( 6px );
	padding: 16px;
}

/*
 * The gate starts visible, so a script that never runs leaves the site closed. A returning visitor's
 * cookie is read by a tiny script in the head, which puts this class on the html element before the page paints.
 */
.wpsp-age-confirmation-screen-overlay[hidden],
.wpsp-age-confirmation-screen-confirmed .wpsp-age-confirmation-screen-overlay {
	display: none;
}

.wpsp-age-confirmation-screen-modal {
	position: relative;
	margin: auto;
	/* Text colour follows the background colour chosen for the gate, so a dark background never leaves dark text on it. */
	color: var( --wpsp-age-confirmation-screen-text, #111111 );
	background: var( --wpsp-age-confirmation-screen-bg, #ffffff );
	border-radius: 12px;
	max-width: 420px;
	width: 100%;
	padding: 36px 28px;
	text-align: center;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.35 );
}

.wpsp-age-confirmation-screen-modal__heading {
	margin: 0 0 12px;
	font-size: 1.5rem;
	color: inherit;
}

.wpsp-age-confirmation-screen-modal__message {
	margin: 0 0 8px;
	color: inherit;
	opacity: 0.85;
}

.wpsp-age-confirmation-screen-modal__minimum-age {
	margin: 0 0 24px;
	font-weight: 600;
	color: inherit;
}

.wpsp-age-confirmation-screen-modal__noscript {
	margin: 0 0 16px;
	font-weight: 600;
}

.wpsp-age-confirmation-screen-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/*
 * Selectors are scoped two levels deep under the modal (rather than bare
 * .wpsp-age-confirmation-screen-modal__button classes) specifically to out-specificity host themes that
 * style buttons more aggressively than a single class — the same real
 * conflict found and fixed on WPSP Discount Wheel (Free) during live testing.
 */
/*
 * Qualified with the element and the theme-sensitive box properties spelled
 * out: themes style bare button elements (size, shadow, hover colours) and a
 * class-only selector can lose that tie on some dark themes.
 */
.wpsp-age-confirmation-screen-modal button.wpsp-age-confirmation-screen-modal__button {
	min-width: 0;
	min-height: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.wpsp-age-confirmation-screen-modal button.wpsp-age-confirmation-screen-modal__button--confirm {
	background-color: var( --wpsp-age-confirmation-screen-primary, #1d3557 );
	color: var( --wpsp-age-confirmation-screen-on-primary, #ffffff );
}

.wpsp-age-confirmation-screen-modal button.wpsp-age-confirmation-screen-modal__button--deny {
	background-color: transparent;
	color: inherit;
	border: 1px solid currentColor;
}

.wpsp-age-confirmation-screen-modal button.wpsp-age-confirmation-screen-modal__button:focus {
	outline: 2px solid var( --wpsp-age-confirmation-screen-text, #111111 );
	outline-offset: 2px;
}

body.wpsp-age-confirmation-screen-open {
	overflow: hidden;
}
