/* Ermes Privacy — banner, pannello delle preferenze, segnaposto. Colori dalle variabili impostate dallo script. */
.ep-root,
.ep-placeholder {
	--ep-bg: #ffffff;
	--ep-text: #1d2733;
	--ep-accent: #1d3b66;
	--ep-accent-text: #ffffff;
	--ep-radius: 10px;
	--ep-line: color-mix(in srgb, var(--ep-text) 16%, transparent);
	--ep-soft: color-mix(in srgb, var(--ep-text) 6%, var(--ep-bg));
}
.ep-root,
.ep-root *,
.ep-placeholder,
.ep-placeholder * {
	box-sizing: border-box;
}
.ep-root {
	position: relative;
	z-index: 2147483647;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ep-text);
	text-align: left;
	-webkit-text-size-adjust: 100%;
}
.ep-root [hidden] { display: none !important; }
html.ep-lock { overflow: hidden; }

.ep-root .ep-title,
.ep-root .ep-dialog-title,
.ep-placeholder .ep-ph-title {
	display: block;
	margin: 0 0 4px;
	padding: 0;
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ep-text);
	letter-spacing: 0;
	text-transform: none;
}
.ep-root p,
.ep-placeholder p {
	margin: 0;
	padding: 0;
	font: inherit;
	color: var(--ep-text);
	text-wrap: pretty;
}
.ep-root .ep-link {
	color: var(--ep-accent);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Bottoni: stessa evidenza per Accetta e Rifiuta */
.ep-root button.ep-btn,
.ep-placeholder button.ep-btn {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: var(--ep-radius);
	border: 2px solid var(--ep-accent);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity .15s ease;
}
.ep-root button.ep-btn-solid,
.ep-placeholder button.ep-btn-solid { background: var(--ep-accent); color: var(--ep-accent-text); }
.ep-root button.ep-btn-ghost { background: transparent; color: var(--ep-accent); }
.ep-root button.ep-btn:hover,
.ep-placeholder button.ep-btn:hover { opacity: .86; }
.ep-root button:focus-visible,
.ep-root input:focus-visible,
.ep-root a:focus-visible,
.ep-root summary:focus-visible,
.ep-placeholder button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ep-accent) 55%, #ffffff);
	outline-offset: 2px;
}
.ep-root button.ep-close {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	top: 6px;
	right: 6px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	color: var(--ep-text);
	opacity: .7;
	cursor: pointer;
	border-radius: 50%;
}
.ep-root button.ep-close:hover { opacity: 1; background: var(--ep-soft); }

/* Banner */
.ep-root .ep-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px 60px 20px 24px;
	background: var(--ep-bg);
	border-top: 1px solid var(--ep-line);
	box-shadow: 0 -8px 30px rgba(0, 0, 0, .14);
	max-height: 90vh;
	overflow: auto;
}
.ep-root .ep-banner .ep-text { flex: 1 1 auto; min-width: 0; max-width: 78ch; }
.ep-root .ep-banner .ep-body { font-size: 14px; }
.ep-root .ep-actions { display: flex; flex: 0 0 auto; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ep-root .ep-pos-box-left,
.ep-root .ep-pos-box-right,
.ep-root .ep-pos-center {
	display: block;
	width: min(440px, calc(100vw - 32px));
	padding: 22px 22px 20px;
	border: 1px solid var(--ep-line);
	border-radius: calc(var(--ep-radius) + 4px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
.ep-root .ep-pos-box-left { left: 16px; right: auto; bottom: 16px; }
.ep-root .ep-pos-box-right { right: 16px; left: auto; bottom: 16px; }
.ep-root .ep-pos-center { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.ep-root .ep-pos-box-left .ep-title,
.ep-root .ep-pos-box-right .ep-title,
.ep-root .ep-pos-center .ep-title { padding-right: 36px; }
.ep-root .ep-pos-box-left .ep-actions,
.ep-root .ep-pos-box-right .ep-actions,
.ep-root .ep-pos-center .ep-actions { margin-top: 16px; justify-content: stretch; }
.ep-root .ep-pos-box-left .ep-actions .ep-btn,
.ep-root .ep-pos-box-right .ep-actions .ep-btn,
.ep-root .ep-pos-center .ep-actions .ep-btn { flex: 1 1 auto; }

/* Pannello delle preferenze */
.ep-root .ep-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, .55);
}
.ep-root .ep-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: min(86vh, 760px);
	background: var(--ep-bg);
	border-radius: calc(var(--ep-radius) + 4px);
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
	outline: none;
	overflow: hidden;
}
.ep-root .ep-dialog-head { padding: 20px 60px 14px 22px; border-bottom: 1px solid var(--ep-line); }
.ep-root .ep-dialog-head .ep-dialog-title { margin: 0; font-size: 19px; }
.ep-root .ep-dialog-body { padding: 16px 22px 8px; overflow: auto; }
.ep-root .ep-intro { margin-bottom: 14px; font-size: 14px; }
.ep-root .ep-cat { padding: 14px 0; border-top: 1px solid var(--ep-line); }
.ep-root .ep-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ep-root .ep-cat-label { margin: 0; padding: 0; font: inherit; font-size: 16px; font-weight: 700; color: var(--ep-text); cursor: pointer; }
.ep-root .ep-cat-desc { margin-top: 4px; font-size: 14px; opacity: .88; }
.ep-root .ep-always { font-size: 13px; font-weight: 700; color: var(--ep-accent); white-space: nowrap; }
.ep-root input.ep-switch {
	all: unset;
	box-sizing: border-box;
	flex: 0 0 auto;
	position: relative;
	width: 48px;
	height: 28px;
	border-radius: 28px;
	background: color-mix(in srgb, var(--ep-text) 30%, var(--ep-bg));
	cursor: pointer;
	transition: background .15s ease;
}
.ep-root input.ep-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .15s ease;
}
.ep-root input.ep-switch:checked { background: var(--ep-accent); }
.ep-root input.ep-switch:checked::after { transform: translateX(20px); }
.ep-root .ep-services { margin-top: 8px; font-size: 13px; }
.ep-root .ep-services summary { cursor: pointer; font-weight: 600; color: var(--ep-accent); width: fit-content; }
.ep-root .ep-services-list { margin-top: 6px; font-size: 13px; opacity: .88; }
.ep-root .ep-meta { padding: 12px 0 8px; border-top: 1px solid var(--ep-line); font-size: 13px; }
.ep-root .ep-consent-id { display: block; margin-top: 6px; font-size: 12px; opacity: .7; overflow-wrap: anywhere; }
.ep-root .ep-dialog-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 22px 18px; border-top: 1px solid var(--ep-line); background: var(--ep-soft); }

/* Bottone per riaprire le preferenze */
.ep-root button.ep-fab {
	all: unset;
	box-sizing: border-box;
	position: fixed;
	bottom: 16px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--ep-bg);
	color: var(--ep-accent);
	border: 1px solid var(--ep-line);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	cursor: pointer;
	opacity: .9;
}
.ep-root button.ep-fab:hover { opacity: 1; }
.ep-root button.ep-fab.ep-fab-left { left: 16px; right: auto; }
.ep-root button.ep-fab.ep-fab-right { right: 16px; left: auto; }

/* Segnaposto dei contenuti bloccati (video, mappe) */
.ep-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 24px 20px;
	background: var(--ep-soft);
	border: 1px dashed var(--ep-line);
	border-radius: var(--ep-radius);
	color: var(--ep-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}
.ep-placeholder .ep-ph-text { max-width: 46ch; }

@media (max-width: 782px) {
	.ep-root .ep-banner { display: block; padding: 18px 16px 16px; }
	.ep-root .ep-banner .ep-title { padding-right: 40px; }
	.ep-root .ep-banner .ep-actions { margin-top: 14px; }
	.ep-root .ep-actions .ep-btn,
	.ep-root .ep-dialog-foot .ep-btn { flex: 1 1 100%; }
	.ep-root .ep-pos-box-left,
	.ep-root .ep-pos-box-right { left: 8px; right: 8px; bottom: 8px; width: auto; }
	.ep-root .ep-dialog-head { padding-left: 16px; }
	.ep-root .ep-dialog-body { padding: 14px 16px 6px; }
	.ep-root .ep-dialog-foot { padding: 12px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.ep-root *, .ep-placeholder * { transition: none !important; }
}
