/* ----------------------------------------------------------------------
   EWD Age Gate - styles frontend
   ---------------------------------------------------------------------- */

body,
html {
	min-height: 100%;
}

body.age-restriction,
html.age-gate-restricted {
	height: 100vh;
	overflow: hidden;
	position: fixed;
	width: 100%;
	top: 0;
	left: 0;
}
form#ewd-age-gate-form .age-gate__banner {
    display: none;
}
body.age-restriction *,
html.age-gate-restricted * {
	box-sizing: border-box;
}

.age-gate-wrapper ~ :not(#wpadminbar) {
	filter: blur(var(--age-gate-blur));
}

.age-gate-wrapper {
	background-color: #ffffff;
	height: 100vh;
	position: fixed;
	z-index: 99998;
	width: 100%;
	top: 0;
	left: 0;
	overflow-y: auto;
	display: flex;
	align-items: center;
	flex-flow: column;
}

.age-gate-wrapper.transition {
	transition: all 0.4s ease-out;
}

.age-gate-wrapper.transition.up {
	transform: translateY(-100%);
}

.age-gate-wrapper.transition.down {
	transform: translateY(100%);
}

.age-gate-wrapper.transition.left {
	transform: translateX(-100%);
}

.age-gate-wrapper.transition.right {
	transform: translateX(100%);
}

.age-gate-wrapper.transition.fade {
	opacity: 0;
}

.age-gate-background,
.age-gate-background-colour {
	position: fixed;
	width: 100vw;
	height: 100vh;
	background-size: cover;
	top: 0;
	left: 0;
	z-index: -1;
}

.age-gate {
	text-align: center;
	width: 100%;
	margin: auto;
}

@media screen and (max-width: 768px) {
	.age-gate {
		padding-bottom: 50px;
	}
}

.age-gate-form {
	margin: 0 auto;
	max-width: 500px;
	width: 100%;
	background: #ffffff;
	padding: 50px 20px;
	position: relative;
}

.age-gate-heading {
	margin: 0 0 10px;
	padding: 0;
}

.age-gate-heading.age-gate-logo {
	margin: 0 auto 10px;
}

.age-gate-heading.age-gate-logo img {
	max-width: 100%;
}

.age-gate-subheading {
	margin: 0 0 10px;
	padding: 0;
}

.age-gate-challenge,
.age-gate-message {
	margin: 0 0 10px;
}

.age-gate-form-elements {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.age-gate-form-section {
	margin: 0 5px 10px;
}

.age-gate-label {
	cursor: pointer;
}

.age-gate-input,
.age-gate-select {
	text-align: center;
	max-width: 80px;
	width: 100%;
}

.age-gate-input::-webkit-contacts-auto-fill-button,
.age-gate-input::-webkit-credentials-auto-fill-button,
.age-gate-select::-webkit-contacts-auto-fill-button,
.age-gate-select::-webkit-credentials-auto-fill-button {
	visibility: hidden;
	pointer-events: none;
	position: absolute;
	right: 0;
}

.age-gate-select {
	min-width: 80px;
}

.age-gate-remember-wrapper {
	margin: 0;
}

.age-gate-error-message + .age-gate-remember-wrapper,
.age-gate-error.has-error + .age-gate-remember-wrapper {
	margin-top: 10px;
}

.age-gate-remember {
	margin: 0 0 10px;
}

.age-gate-submit {
	margin-bottom: 10px;
}

.age-gate-submit:disabled {
	cursor: not-allowed !important;
}

.age-gate-submit-yes {
	margin: 0 5px 10px 0;
}

.age-gate-submit-no,
.age-gate-submit-yes.age-gate-submit--reversed {
	margin: 0 0 10px 5px;
}

.age-gate-submit-no.age-gate-submit--reversed {
	margin: 0 5px 10px 0;
}

.age-gate-submit-no:disabled,
.age-gate-submit-yes:disabled {
	cursor: not-allowed;
}

.age-gate-error-message {
    color: #cb7d7d !important;
    margin: 0;
    font-weight: 500;
}

.age-gate-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 100;
	display: none;
}

.age-gate-working .age-gate-loader {
	display: block;
}

.age-gate-working .age-gate-form {
	pointer-events: none;
	opacity: 0.3;
}

.age-gate-loading-icon {
	fill: #000000;
}

/* Shortcode wrapper (inline usage). */
.age-gate-sc-wrapper {
	position: relative;
}

.age-gate-sc-wrapper .age-gate {
	text-align: left;
}

.age-gate-sc-wrapper .age-gate .age-gate-form-elements {
	justify-content: flex-start;
	padding: 0;
	margin-left: -5px;
}

.age-gate-sc-wrapper .age-gate .age-gate-form-elements label {
	display: block;
}

.age-gate-sc-wrapper .age-gate-inline-message {
	background-color: #af0606;
	display: inline-block;
	color: #ffffff;
	padding: 5px 10px;
}

.age-gate-sc-wrapper.working .age-gate-loader {
	display: block;
}

.age-gate-sc-wrapper.working::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.2);
	width: 100%;
	height: 100%;
}

.age-gate-inline-failed {
	color: #af0606;
	display: flex;
	align-items: center;
	flex-flow: row wrap;
	margin-bottom: 1em;
}

.age-gate-inline-failed p {
	margin: 0;
	padding-left: 10px;
}

.age-gate-inline-failed .age-gate-inline-failed-icon {
	width: 30px;
	height: 30px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='age-gate-stop'%3E%3Cpath fill='%23AF0606' d='M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z'/%3E%3C/svg%3E");
	background-size: cover;
	background-repeat: no-repeat;
}

.age-gate-inline-failed .age-gate-inline-failed-icon svg {
	display: block;
}

/* Stepped mode. */
.age-gate-steps {
	position: relative;
	margin-bottom: 15px;
	overflow: hidden;
}

.age-gate-steps .age-gate-form-section {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
}

.age-gate-steps .age-gate-form-section label {
	display: block;
}

.age-gate-steps .age-gate-form-section input {
	max-width: 50%;
}

/* ----------------------------------------------------------------------
   EWD Age Gate - additions plugin (banner, additional, cookie warning)
   ---------------------------------------------------------------------- */

/* Le wrapper devient transparent : on garde la couleur via .age-gate-background-colour. */
.age-gate-wrapper {
	background-color: transparent;
}

/* On ne floute pas le contenu en arrière-plan par défaut. */
:root {
	--age-gate-blur: 0;
}

/* Permettre la fermeture du popup sans rechargement. */
html.age-gate-restricted body {
	overflow: hidden !important;
}
noscript + img.age-gate__banner {
    display: none !important;
}
/* Bannière sous le formulaire. */
.age-gate__banner {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0;
}

/* Contenu additionnel (WYSIWYG). */
.age-gate-additional {
	margin: 15px auto 0;
	max-width: 460px;
	font-size: 13px;
	line-height: 1.5;
}

.age-gate-additional p {
	margin: 0 0 8px;
}

.age-gate-additional p:last-child {
	margin-bottom: 0;
}

.age-gate-additional a {
	color: inherit;
	text-decoration: underline;
}

/* Avertissement cookies. */
.age-gate-cookie-warning {
	margin-top: 12px;
	font-size: 13px;
	padding: 8px 12px;
	background-color: rgba(255, 200, 0, 0.15);
	border: 1px solid currentColor;
	color: inherit;
	max-width: 460px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.age-gate-cookie-warning[hidden] {
	display: none;
}

/* Champ de date enveloppant le label + input. */
.age-gate-form-section .age-gate-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.85;
	margin-bottom: 4px;
}

/* Style minimal des champs date pour qu'ils soient lisibles. */
.age-gate-input,
.age-gate-select {
	padding: 8px 10px;
	font-size: 16px;
	font-family: inherit;
	border: 1px solid currentColor;
	background-color: #ffffff;
	color: #000000;
	border-radius: 0;
}

.age-gate-input[type="number"]::-webkit-outer-spin-button,
.age-gate-input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.age-gate-input[type="number"] {
	-moz-appearance: textfield;
}

/* Style minimal des boutons. */
.age-gate-submit,
.age-gate-submit-yes,
.age-gate-submit-no {
	display: inline-block;
	min-width: 120px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 0;
	transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
	font-family: inherit;
}

.age-gate-submit:hover,
.age-gate-submit-yes:hover,
.age-gate-submit-no:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

.age-gate-submit:focus,
.age-gate-submit-yes:focus,
.age-gate-submit-no:focus {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.age-gate-remember-wrapper {
	display: flex;
	justify-content: center;
}

.age-gate-remember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
	user-select: none;
}

.age-gate-remember-checkbox {
	width: 16px;
	height: 16px;
	margin: 0;
}

@media (max-width: 600px) {
	.age-gate-form {
		padding: 30px 15px;
	}

	.age-gate-submit-yes,
	.age-gate-submit-no,
	.age-gate-submit {
		min-width: 100px;
		padding: 10px 18px;
	}
}
