/* MDB Cookie Manager – banner.css */

#mdbcm-root {
	--mdbcm-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	font-family: var(--mdbcm-font, inherit);
	color: var(--mdbcm-text, #1b2420);
}

#mdbcm-root .mdbcm-logo {
	display: block;
	height: var(--mdbcm-logo-h, 36px);
	width: auto;
	max-width: 70%;
	margin: 0 0 12px;
	object-fit: contain;
	object-position: left center;
}

/* Chiusura garantita: nessun CSS del tema può tenere visibili elementi nascosti. */
#mdbcm-root[hidden],
#mdbcm-root [hidden] {
	display: none !important;
}

/* ---------- Banner compatto ---------- */

#mdbcm-root .mdbcm-banner {
	position: fixed;
	z-index: 99998;
	bottom: 16px;
	left: 16px;
	max-width: 320px;
	width: calc(100vw - 32px);
	background: var(--mdbcm-bg, #fff);
	border-radius: var(--mdbcm-radius, 14px);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
	border: 1px solid rgba(0, 0, 0, 0.06);
	padding: 14px 16px 10px;
	box-sizing: border-box;
	animation: mdbcm-in 0.35s ease both;
}

@keyframes mdbcm-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	#mdbcm-root .mdbcm-banner { animation: none; }
}

#mdbcm-root[data-position="bottom-right"] .mdbcm-banner {
	left: auto;
	right: 20px;
}

#mdbcm-root[data-position="bottom-center"] .mdbcm-banner {
	left: 50%;
	transform: translateX(-50%);
	max-width: 640px;
}

#mdbcm-root .mdbcm-title {
	margin: 0 0 8px;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

#mdbcm-root .mdbcm-text {
	margin: 0 0 10px;
	font-size: 0.78rem;
	line-height: 1.5;
	opacity: 0.85;
}

#mdbcm-root .mdbcm-modal .mdbcm-text {
	font-size: 0.86rem;
}

#mdbcm-root .mdbcm-link {
	color: var(--mdbcm-accent, #1e3b32);
	text-decoration: underline;
}

/* ---------- Bottoni ---------- */

#mdbcm-root .mdbcm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

#mdbcm-root .mdbcm-btn {
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 10px 16px;
	border-radius: calc(var(--mdbcm-radius, 14px) * 0.7);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

#mdbcm-root .mdbcm-compact .mdbcm-btn {
	font-size: 0.76rem;
	padding: 7px 13px;
}

#mdbcm-root .mdbcm-compact .mdbcm-branding {
	margin-top: 8px;
	font-size: 0.6rem;
	opacity: 0.45;
}

#mdbcm-root .mdbcm-btn:hover { opacity: 0.88; transform: translateY(-1px); }

#mdbcm-root .mdbcm-btn-primary {
	background: var(--mdbcm-accent, #1e3b32);
	color: var(--mdbcm-accent-text, #fff);
}

#mdbcm-root .mdbcm-btn-secondary {
	background: transparent;
	color: var(--mdbcm-text, #1b2420);
	box-shadow: inset 0 0 0 1.5px currentColor;
}

#mdbcm-root .mdbcm-btn-ghost {
	background: transparent;
	color: var(--mdbcm-text, #1b2420);
	text-decoration: underline;
	padding-left: 6px;
	padding-right: 6px;
}

/* ---------- Branding ---------- */

#mdbcm-root .mdbcm-branding {
	margin: 12px 0 0;
	font-size: 0.68rem;
	opacity: 0.55;
}

#mdbcm-root .mdbcm-branding a {
	color: inherit;
	text-decoration: underline;
}

/* ---------- Modale preferenze ---------- */

#mdbcm-root .mdbcm-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

#mdbcm-root .mdbcm-modal-card {
	background: var(--mdbcm-bg, #fff);
	border-radius: var(--mdbcm-radius, 14px);
	box-shadow: var(--mdbcm-shadow);
	max-width: 520px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 26px;
	box-sizing: border-box;
}

#mdbcm-root .mdbcm-cat {
	padding: 14px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

#mdbcm-root .mdbcm-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

#mdbcm-root .mdbcm-cat-label {
	font-weight: 700;
	font-size: 0.95rem;
}

#mdbcm-root .mdbcm-cat-desc {
	margin: 6px 0 0;
	font-size: 0.82rem;
	line-height: 1.5;
	opacity: 0.75;
}

/* ---------- Switch ---------- */

#mdbcm-root .mdbcm-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex: 0 0 auto;
}

#mdbcm-root .mdbcm-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

#mdbcm-root .mdbcm-slider {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 24px;
	transition: background 0.2s ease;
}

#mdbcm-root .mdbcm-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

#mdbcm-root .mdbcm-switch input:checked + .mdbcm-slider {
	background: var(--mdbcm-accent, #1e3b32);
}

#mdbcm-root .mdbcm-switch input:checked + .mdbcm-slider::before {
	transform: translateX(20px);
}

#mdbcm-root .mdbcm-switch input:disabled + .mdbcm-slider {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ---------- Pulsante riapertura ---------- */

#mdbcm-root .mdbcm-reopen {
	position: fixed;
	z-index: 99997;
	bottom: 20px;
	left: 20px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--mdbcm-accent, #1e3b32);
	color: var(--mdbcm-accent-text, #fff);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--mdbcm-shadow);
	transition: transform 0.15s ease;
}

#mdbcm-root[data-position="bottom-right"] .mdbcm-reopen {
	left: auto;
	right: 20px;
}

#mdbcm-root .mdbcm-reopen:hover { transform: scale(1.08); }

/* ---------- Iframe bloccati ---------- */

.mdbcm-blocked-iframe {
	background: repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 12px, #e9e9e9 12px, #e9e9e9 24px);
	min-height: 120px;
}

@media (max-width: 480px) {
	#mdbcm-root .mdbcm-banner { bottom: 10px; left: 10px; width: calc(100vw - 20px); max-width: none; }
	#mdbcm-root[data-position="bottom-right"] .mdbcm-banner { right: 10px; }
}
