/* Cookie consent dialog (#consentpopup). Markup: Creem_Tags::cookiestatement(). Behaviour: app.js + consent.js.
   Self-contained on purpose: the legacy .cookie-pop-up rules compiled into app.css would clash with it. */
/* Hidden until app.js decides the visitor still has to answer (no flash for returning visitors). */
.consent-popup { display: none; position: relative; z-index: 999999; }
.consent-popup.hide { display: none !important; }
.consent-popup .popup-filter { position: fixed; inset: 0; z-index: 90; width: 100%; height: 100%; overflow: hidden; background: rgba(0, 0, 0, .5); }
.consent-popup-window {
	position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 200;
	display: grid; grid-template-rows: auto 1fr auto;
	width: calc(100% - 40px); max-width: 625px; max-height: calc(100vh - 40px);
	color: #000; background: #F8F9ED; border-radius: 4px; box-shadow: 0 0 10px rgba(0, 0, 0, .1);
	font-family: "Poppins", Arial, sans-serif;
}
.consent-popup-window .notifications-header { padding: 20px 40px; color: #000; background: #f087aa; font-weight: 700; line-height: normal; }
.consent-popup-window .notifications-header h3 { margin: 0; color: inherit; font-size: 1.5rem; }
.consent-popup-window h4 { margin: 0 0 .5rem; color: #000; font-size: 1.3rem; font-weight: 700; }
.consent-popup-window .notifications-content {
	display: flex; flex-direction: column; align-items: center; justify-content: space-between;
	padding: 20px 40px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9A9A9A transparent;
}
.consent-popup-window .notifications-content-text { flex-grow: 1; font-size: .875rem; }
.consent-popup-window .notifications-content-text p { margin: 0 0 1.5rem; line-height: 1.6em; }
.consent-popup-window .notifications-content-text a { margin-left: 0; font-weight: 700; text-decoration: underline; }
.consent-popup-window .notifications-content-action { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 15px; justify-content: space-between; padding: 30px 40px; }
.consent-popup-window .cookies-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; }
.consent-popup-window .cookies-buttons a { margin: 0; }

.consent-popup-window .cookie-options { display: flex; flex-direction: column; width: 100%; }
.consent-popup-window .cookie-options h4 { margin-bottom: 0; }
.consent-popup-window .cookieoption-item { min-width: 250px; border: 1px solid #E5E5E5; border-top: 0; }
.consent-popup-window .cookieoption-item:first-of-type { margin-top: 10px; border-top: 1px solid #E5E5E5; border-radius: 10px 10px 0 0; }
.consent-popup-window .cookieoption-item:last-of-type { border-radius: 0 0 10px 10px; }
.consent-popup-window .cookieoption-item-header { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 0 0 20px; }
.consent-popup-window .cookieoption-item-name { position: relative; padding-left: 20px; font-weight: 700; cursor: pointer; }
.consent-popup-window .cookieoption-item-name svg { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin-top: -3px; color: currentColor; fill: currentColor; transition: transform .3s ease-out; }
.consent-popup-window .cookieoption-item-name.active svg { transform: rotate(180deg); }
.consent-popup-window .cookieoption-item-description { padding: 0 10px 20px; font-size: .875rem; line-height: 1.4; }
.consent-popup-window .cookieoption-item-description p { margin: 0; }

/* Toggle switch */
.consent-popup-window .cookieoption-item [type="checkbox"] { position: absolute; left: -9999px; }
.consent-popup-window .cookieoption-item label { display: flex; align-items: center; justify-content: space-between; margin-right: 20px; padding: 15px; cursor: pointer; }
.consent-popup-window .cookieoption-item label span:first-child { padding: 8px; }
.consent-popup-window .cookieoption-item label span:last-child {
	position: relative; width: 50px; height: 26px; border-radius: 15px; background: #9A9A9A;
	box-shadow: inset 0 0 5px rgba(0, 0, 0, .4); transition: background .3s;
}
.consent-popup-window .cookieoption-item label span:last-child::before {
	content: ""; position: absolute; top: 1px; left: 1px; z-index: 1; width: 24px; height: 24px;
	border-radius: 50%; background: #fff; transition: transform .3s;
}
.consent-popup-window .cookieoption-item [type="checkbox"]:checked + label span:last-child { background: #f087aa; }
.consent-popup-window .cookieoption-item [type="checkbox"]:checked + label span:last-child::before { transform: translateX(24px); }
.consent-popup-window .cookieoption-item [type="checkbox"]:focus-visible + label span:last-child { outline: 2px solid #000; outline-offset: 2px; }
.consent-popup-window .cookieoption-item-header.inactive [type="checkbox"]:checked + label { cursor: not-allowed; }
.consent-popup-window .cookieoption-item-header.inactive [type="checkbox"]:checked + label span:last-child { opacity: .8; }

body.no-scroll { overflow: hidden; }

@media (max-width: 600px) {
	.consent-popup-window { display: flex; flex-direction: column; max-width: none; max-height: 90vh; z-index: 101; font-size: .875rem; }
	.consent-popup-window .notifications-header { display: flex; padding: 20px; }
	.consent-popup-window .notifications-content { height: min-content; padding: 0 20px; }
	.consent-popup-window .notifications-content-action { padding: 15px 20px 20px; }
	.consent-popup-window .cookieoption-item-name { font-size: .8rem; }
	.consent-popup-window .cookieoption-item label span:last-child { width: 28px; height: 16px; }
	.consent-popup-window .cookieoption-item label span:last-child::before { width: 14px; height: 14px; }
	.consent-popup-window .cookieoption-item [type="checkbox"]:checked + label span:last-child::before { transform: translateX(12px); }
	.consent-popup-window .cookies-buttons a { font-size: .75rem; }
}

/* Cookie lists inside the category descriptions */
.consent-popup-window .cookieoption-item-description ul { margin: .5rem 0 0; padding-left: 1.2rem; list-style: disc; }
.consent-popup-window .cookieoption-item-description li { margin: 0 0 .25rem; }

/* Keyboard focus */
.consent-popup-window:focus { outline: none; }
.consent-popup-window .cookieoption-item-name:focus-visible,
.consent-popup-window .cookies-buttons a:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

.recaptcha-notice { margin-top: 1rem; font-size: .75rem; }
.recaptcha-notice a { text-decoration: underline; }

/* Third party video placeholder (YouTube / Vimeo) */
.video.video-consent { background: #000; cursor: pointer; }
.video-consent-box {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 12px; padding: 20px; text-align: center; color: #F8F9ED;
}
.video-consent-notice { max-width: 40em; margin: 0; font-size: .8rem; line-height: 1.4; color: inherit; }
.video-consent .btn:focus-visible { outline: 2px solid #F8F9ED; outline-offset: 2px; }
