/* Astes4 Cookie Consent */
.acc-root {
	--acc-primary: #1f5fa8;
	--acc-bg: #ffffff;
	--acc-text: #1d1d1f;
	--acc-radius: 8px;
	--acc-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	font-size: 16px;
	line-height: 1.5;
	color: var(--acc-text);
}
.acc-root *, .acc-root *::before, .acc-root *::after { box-sizing: border-box; }
.acc-root [hidden] { display: none !important; }
.acc-root p { margin: 0 0 .6em; padding: 0; color: inherit; font-size: inherit; line-height: inherit; }
.acc-root p:last-child { margin-bottom: 0; }
.acc-root a { color: var(--acc-primary); text-decoration: underline; }

/* ---------- Banner ---------- */
.acc-banner {
	position: fixed;
	z-index: 2147483000;
	background: var(--acc-bg);
	color: var(--acc-text);
	box-shadow: var(--acc-shadow);
	padding: 24px;
	font-family: inherit;
}
.acc-banner-body { padding-right: 20px; }
.acc-title { font-weight: 700; font-size: 17px !important; margin-bottom: .4em !important; padding-right: 32px !important; }

.acc-pos-bar .acc-banner {
	left: 0; right: 0; bottom: 0;
	display: flex; align-items: center; gap: 24px;
	padding: 20px max(24px, calc((100% - 1200px) / 2));
}
.acc-pos-bar .acc-banner-body { flex: 1 1 auto; }
.acc-pos-bar .acc-actions { flex: 0 0 auto; }

.acc-pos-box-left .acc-banner,
.acc-pos-box-right .acc-banner {
	bottom: 20px; width: 440px; max-width: calc(100% - 32px);
	border-radius: 6px;
}
.acc-pos-box-left .acc-banner { left: 20px; }
.acc-pos-box-right .acc-banner { right: 20px; }

.acc-pos-center .acc-banner {
	top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 560px; max-width: calc(100% - 32px); max-height: calc(100% - 32px); overflow: auto;
	border-radius: var(--acc-radius);
	box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45), var(--acc-shadow);
}

.acc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.acc-pos-bar .acc-actions { margin-top: 0; }
.acc-pos-box-left .acc-actions .acc-btn,
.acc-pos-box-right .acc-actions .acc-btn,
.acc-pos-center .acc-banner .acc-actions .acc-btn { flex: 1 1 auto; }

/* ---------- Pulsanti (reset contro gli stili di Divi) ---------- */
.acc-root .acc-btn {
	-webkit-appearance: none; appearance: none;
	display: inline-flex; align-items: center; justify-content: center;
	margin: 0; padding: 11px 20px;
	min-height: 44px;
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
	letter-spacing: normal; text-transform: none; text-align: center;
	border: 2px solid var(--acc-primary);
	border-radius: 6px;
	background: var(--acc-primary);
	color: #fff;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease;
}
.acc-root .acc-btn::after, .acc-root .acc-btn::before { display: none !important; }
.acc-root .acc-btn:hover { filter: brightness(1.1); }
.acc-root .acc-btn-ghost { background: transparent; color: var(--acc-primary); }
.acc-root .acc-btn-ghost:hover { background: rgba(0, 0, 0, .04); filter: none; }
.acc-root .acc-btn:focus-visible,
.acc-root .acc-close:focus-visible,
.acc-root .acc-reopen:focus-visible,
.acc-root .acc-switch input:focus-visible + .acc-slider {
	outline: 3px solid var(--acc-primary); outline-offset: 2px;
}

.acc-root .acc-close {
	-webkit-appearance: none; appearance: none;
	position: absolute; top: 12px; right: 12px;
	width: 36px; height: 36px; padding: 0; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent; border: 0; border-radius: 50%;
	color: var(--acc-text); opacity: .7; cursor: pointer;
}
.acc-root .acc-close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.acc-root .acc-close-static { position: static; flex: 0 0 auto; }

/* ---------- Pannello preferenze ---------- */
.acc-overlay {
	position: fixed; inset: 0; z-index: 2147483001;
	background: rgba(0, 0, 0, .5);
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
}
.acc-modal {
	background: var(--acc-bg); color: var(--acc-text);
	width: 640px; max-width: 100%; max-height: 100%;
	display: flex; flex-direction: column;
	border-radius: var(--acc-radius); box-shadow: var(--acc-shadow);
	outline: none;
}
.acc-modal-head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px 24px; border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.acc-modal-head .acc-title { margin: 0 !important; padding: 0 !important; }
.acc-modal-body { padding: 18px 24px; overflow-y: auto; }
.acc-modal-foot { margin: 0; padding: 16px 24px; border-top: 1px solid rgba(0, 0, 0, .1); justify-content: flex-end; }

.acc-cat { padding: 14px 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.acc-cat:first-of-type { margin-top: 14px; }
.acc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.acc-cat-title { font-weight: 700; }
.acc-cat-desc { margin-top: 6px; font-size: 14px; opacity: .85; }
.acc-always { font-size: 13px; font-weight: 600; color: var(--acc-primary); white-space: nowrap; }

.acc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; margin: 0; cursor: pointer; }
.acc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.acc-slider {
	position: absolute; inset: 0; border-radius: 26px;
	background: #b8b8bd; transition: background-color .2s ease;
}
.acc-slider::before {
	content: ""; position: absolute; left: 3px; top: 3px;
	width: 20px; height: 20px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s ease;
}
.acc-switch input:checked + .acc-slider { background: var(--acc-primary); }
.acc-switch input:checked + .acc-slider::before { transform: translateX(20px); }

html.acc-modal-open, html.acc-modal-open body { overflow: hidden; }

/* ---------- Pulsante riapertura ---------- */
.acc-root .acc-reopen {
	-webkit-appearance: none; appearance: none;
	position: fixed; bottom: 20px; z-index: 2147482999;
	width: 46px; height: 46px; padding: 0; margin: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: var(--acc-primary); color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	cursor: pointer; opacity: .9;
}
.acc-root .acc-reopen:hover { opacity: 1; }
.acc-reopen-left { left: 20px; }
.acc-reopen-right { right: 20px; }

/* ---------- Mobile ---------- */
@media (max-width: 782px) {
	.acc-pos-bar .acc-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 16px; }
	.acc-pos-box-left .acc-banner, .acc-pos-box-right .acc-banner { left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; }
	.acc-banner { max-height: 85vh; overflow-y: auto; }
	.acc-actions .acc-btn { flex: 1 1 100%; }
	.acc-modal-head, .acc-modal-body, .acc-modal-foot { padding-left: 16px; padding-right: 16px; }
	.acc-root .acc-reopen { bottom: 16px; width: 42px; height: 42px; }
	.acc-reopen-left { left: 16px; }
	.acc-reopen-right { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.acc-root * { transition: none !important; }
}

/* ---------- Stile "Accetta tutti" in evidenza (come il banner CookieYes attuale) ---------- */
.acc-style-accept-primary .acc-banner .acc-actions { justify-content: space-around; row-gap: 6px; margin-top: 20px; }
.acc-root.acc-style-accept-primary .acc-banner .acc-btn-secondary {
	flex: 0 1 auto;
	background: transparent; border-color: transparent; color: var(--acc-primary);
	padding: 10px 8px; font-weight: 600;
}
.acc-root.acc-style-accept-primary .acc-banner .acc-btn-secondary:hover { text-decoration: underline; filter: none; }
.acc-root.acc-style-accept-primary .acc-banner .acc-btn-primary { flex: 1 1 100%; min-height: 48px; border-radius: 4px; }
.acc-pos-bar.acc-style-accept-primary .acc-banner .acc-actions { margin-top: 0; align-items: center; }
.acc-root.acc-pos-bar.acc-style-accept-primary .acc-banner .acc-btn-primary { flex: 0 0 auto; padding-left: 36px; padding-right: 36px; }

/* ---------- Stile "stessa evidenza" ---------- */
.acc-root.acc-style-equal .acc-btn-customize { background: transparent; color: var(--acc-primary); }

/* ---------- ID consenso ---------- */
.acc-consent-id { margin-top: 14px !important; font-size: 13px !important; opacity: .75; }
.acc-consent-id code { font-size: 12px; background: rgba(0, 0, 0, .06); padding: 2px 6px; border-radius: 4px; }

/* ---------- Video click-to-play ---------- */
.acc-video {
	position: relative; display: block; width: 100%;
	aspect-ratio: 16 / 9; overflow: hidden;
	background: #111; color: #fff;
	font-size: 15px; line-height: 1.45;
}
.acc-video .acc-video-thumb {
	position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
	margin: 0; object-fit: cover; filter: brightness(.5);
}
.acc-video-inner {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 14px; padding: 16px; text-align: center;
}
.acc-video .acc-video-load {
	-webkit-appearance: none; appearance: none;
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0; padding: 12px 22px; min-height: 48px;
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2;
	border: 0; border-radius: 4px; cursor: pointer;
	background: var(--acc-primary, #741e14); color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.acc-video .acc-video-load:hover { filter: brightness(1.15); }
.acc-video .acc-video-load:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.acc-video .acc-video-notice { max-width: 520px; margin: 0; padding: 0; font-size: 13px; color: #fff; opacity: .9; }
.acc-video .acc-video-notice a { color: #fff; text-decoration: underline; }
.acc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 480px) { .acc-video .acc-video-notice { font-size: 11px; line-height: 1.3; } .acc-video-inner { gap: 8px; padding: 10px; } .acc-video .acc-video-load { min-height: 40px; padding: 8px 16px; font-size: 14px; } }
