/* Cookie Tacci — banner e preferenze.
   Modo chiaro: banner nero, testi bianchi, dettagli gialli.
   Dark mode (selettore nelle impostazioni): banner bianco, testi neri, dettagli rossi. */

.tc,
.tc-embed {
	--tc-bg: #1E1E1E;
	--tc-fg: #FFFFFF;
	--tc-muted: #A8A8A8;
	--tc-line: #3A3A3A;
	--tc-acc: #F5C643;
	--tc-on-acc: #1E1E1E;
	--tc-press: #E40534;
	--tc-on-press: #FFFFFF;
	--tc-ph-bg: #E0E0E0;
	--tc-ph-fg: #1E1E1E;
	--tc-ph-btn: #1E1E1E;
	--tc-ph-on-btn: #FFFFFF;
	--tc-font: var(--tacci-font, "D DIN", "D-DIN", "DIN Alternate", "Barlow", system-ui, sans-serif);
	--tc-font-titoli: var(--tacci-font-titoli, Anton, "Arial Narrow", sans-serif);
	--tc-curva: cubic-bezier(.7, 0, .2, 1);
}

.tc {
	font-family: var(--tc-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--tc-fg);
	-webkit-font-smoothing: antialiased;
}

.tc *,
.tc *::before,
.tc *::after { box-sizing: border-box; }

.tc [hidden],
.tc-embed [hidden] { display: none !important; }

.tc p { margin: 0; }
.tc a { color: inherit; }

/* Azzeramento dei bottoni: il tema Hello Elementor colora tutti i bottoni di rosa. */
.tc button,
.tc-embed button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.tc button:focus-visible,
.tc a:focus-visible,
.tc-embed button:focus-visible,
.tc-embed a:focus-visible {
	outline: 2px solid var(--tc-acc);
	outline-offset: 3px;
}

/* Testi */
.tc .tc-lbl {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tc-muted);
}

.tc .tc-titolo {
	margin: 0;
	padding: 0;
	font-family: var(--tc-font-titoli);
	font-weight: 400;
	font-size: 76px;
	line-height: .86;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--tc-fg);
}

.tc .tc-dot { color: var(--tc-acc); }

.tc .tc-head {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tc .tc-lnk {
	color: var(--tc-fg);
	text-decoration: underline;
	text-decoration-color: var(--tc-acc);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.tc .tc-lnk:hover { color: var(--tc-acc); }

/* Bottoni: Rifiuta, Personalizza e Accetta hanno lo stesso peso. */
.tc .tc-bt,
.tc .tc-bt:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	margin: 0;
	border: 1.5px solid var(--tc-fg);
	border-radius: 0;
	background: transparent;
	color: var(--tc-fg);
	font-family: var(--tc-font);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	box-shadow: none;
	transition: background .15s, color .15s, border-color .15s;
}

.tc .tc-bt:hover {
	background: var(--tc-acc);
	border-color: var(--tc-acc);
	color: var(--tc-on-acc);
}

.tc .tc-bt:active {
	background: var(--tc-press);
	border-color: var(--tc-press);
	color: var(--tc-on-press);
}

.tc .tc-x,
.tc .tc-x:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: transparent;
	color: var(--tc-fg);
}

.tc .tc-x:hover { color: var(--tc-acc); background: transparent; }

/* ---------- Banner ---------- */
.tc .tc-banner {
	position: fixed;
	left: 40px;
	right: 40px;
	bottom: 32px;
	z-index: 99998;
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr) auto;
	gap: 24px 48px;
	align-items: end;
	padding: 32px 32px 32px 40px;
	background: var(--tc-bg);
	color: var(--tc-fg);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .5s var(--tc-curva), transform .5s var(--tc-curva);
}

.tc .tc-banner.tc-in {
	opacity: 1;
	transform: none;
}

.tc .tc-banner > .tc-x {
	position: absolute;
	top: 12px;
	right: 12px;
}

.tc .tc-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 560px;
}

.tc .tc-testo { font-size: 16px; line-height: 1.55; }
.tc .tc-small { font-size: 13px; color: var(--tc-muted); }

.tc .tc-azioni {
	display: flex;
	gap: 12px;
}

/* ---------- Pannello preferenze ---------- */
.tc .tc-velo {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	justify-content: flex-end;
	background: rgba(30, 30, 30, .55);
	opacity: 0;
	transition: opacity .4s var(--tc-curva);
}

.tc .tc-velo.tc-in { opacity: 1; }

.tc .tc-pannello {
	display: flex;
	flex-direction: column;
	width: 600px;
	max-width: 100%;
	height: 100%;
	background: var(--tc-bg);
	color: var(--tc-fg);
	outline: none;
	transform: translateX(40px);
	transition: transform .5s var(--tc-curva);
}

.tc .tc-velo.tc-in .tc-pannello { transform: none; }

.tc .tc-p-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
	padding: 40px 40px 0;
}

.tc .tc-intro {
	margin: 20px 40px 24px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--tc-muted);
}

.tc .tc-cats {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 40px;
}

.tc .tc-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px 32px;
	align-items: start;
	padding: 20px 0;
	border-top: 1px solid var(--tc-line);
}

.tc .tc-row:last-child { border-bottom: 1px solid var(--tc-line); }

.tc .tc-row-t {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tc .tc-cat {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.tc .tc-desc { font-size: 14px; line-height: 1.5; }

.tc .tc-serv {
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tc-muted);
}

.tc .tc-row-c {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-top: 2px;
}

.tc .tc-stato {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tc-muted);
	white-space: nowrap;
}

/* Interruttore quadrato, come quello della dark mode del tema. */
.tc .tc-sw,
.tc .tc-sw:focus,
.tc .tc-sw:hover {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 46px;
	height: 24px;
	border: 1.5px solid var(--tc-fg);
	background: transparent;
}

/* Area di tocco di almeno 44 px. */
.tc .tc-sw::after {
	content: "";
	position: absolute;
	inset: -11px -4px;
}

.tc .tc-sw .tc-k {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 15px;
	height: 15px;
	background: var(--tc-fg);
	transition: transform .3s var(--tc-curva), background .2s;
}

.tc .tc-sw[aria-checked="true"] .tc-k {
	transform: translateX(22px);
	background: var(--tc-acc);
}

.tc .tc-sw:active .tc-k { background: var(--tc-press); }

.tc .tc-sw[disabled] {
	cursor: not-allowed;
	opacity: .55;
}

.tc .tc-piede {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	padding: 24px 40px 40px;
}

.tc .tc-piede .tc-bt { padding: 0 12px; }

.tc .tc-id {
	margin-top: -24px;
	padding: 0 40px 24px;
	font-size: 11px;
	color: var(--tc-muted);
	overflow-wrap: anywhere;
}

.tc .tc-id code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	background: none;
	color: inherit;
	padding: 0;
}

/* ---------- Dopo la scelta ---------- */
.tc .tc-angolo {
	position: fixed;
	left: 40px;
	bottom: 32px;
	z-index: 99997;
	display: flex;
	align-items: center;
	gap: 12px;
	pointer-events: none;
}

.tc .tc-angolo > * { pointer-events: auto; }

.tc .tc-fab,
.tc .tc-fab:focus {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 16px 0 12px;
	background: var(--tc-bg);
	color: var(--tc-fg);
	font-family: var(--tc-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.tc .tc-fab:hover { background: var(--tc-bg); color: var(--tc-fg); }

.tc .tc-fsq {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: var(--tc-acc);
	color: var(--tc-on-acc);
	transition: background .15s, color .15s;
}

.tc .tc-fab:hover .tc-fsq {
	background: var(--tc-on-acc);
	color: var(--tc-acc);
}

.tc .tc-fab:active .tc-fsq { background: var(--tc-press); color: var(--tc-on-press); }

.tc .tc-toast {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	background: var(--tc-bg);
	color: var(--tc-fg);
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .4s var(--tc-curva), transform .4s var(--tc-curva);
	pointer-events: none;
}

.tc .tc-toast.tc-in {
	opacity: 1;
	transform: none;
}

.tc .tc-toast:empty { display: none; }

html.tc-bloccato,
html.tc-bloccato body { overflow: hidden; }

/* ---------- Contenuti esterni bloccati ---------- */
.tc-embed {
	position: relative;
	display: block;
	max-width: 100%;
	font-family: var(--tc-font);
}

.tc-embed:not(.tc-embed-ok) { min-height: 240px; }

.tc-embed .tc-ph {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 10px;
	padding: 24px;
	background: var(--tc-ph-bg);
	color: var(--tc-ph-fg);
	text-align: left;
}

.tc-embed.tc-embed-ok .tc-ph { display: none; }

.tc-embed .tc-ph-t {
	font-family: var(--tc-font-titoli);
	font-size: 28px;
	line-height: 1;
	text-transform: uppercase;
}

.tc-embed .tc-ph-d {
	max-width: 420px;
	font-size: 14px;
	line-height: 1.5;
}

.tc-embed .tc-ph-a {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-top: 6px;
}

.tc-embed .tc-ph-b,
.tc-embed .tc-ph-b:focus {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	background: var(--tc-ph-btn);
	color: var(--tc-ph-on-btn);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.tc-embed .tc-ph-b:hover {
	background: var(--tc-acc);
	color: var(--tc-on-acc);
}

.tc-embed .tc-ph-l {
	color: var(--tc-ph-fg);
	font-size: 13px;
	text-decoration: underline;
	text-decoration-color: var(--tc-acc);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* Tabella della cookie policy: eredita i colori del tema. */
.tc-elenco table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 32px;
	font-size: 14px;
}

.tc-elenco th,
.tc-elenco td {
	padding: 10px 12px 10px 0;
	border-bottom: 1px solid currentColor;
	text-align: left;
	vertical-align: top;
}

.tc-elenco th {
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* ---------- Schermi medi ---------- */
@media (max-width: 1100px) {
	.tc .tc-banner {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		align-items: start;
	}
	.tc .tc-body { max-width: 720px; }
	.tc .tc-titolo { font-size: 64px; }
}

/* ---------- Telefono ---------- */
@media (max-width: 640px) {
	.tc .tc-banner {
		left: 12px;
		right: 12px;
		bottom: 12px;
		gap: 14px;
		padding: 24px 20px 20px;
		max-height: calc(100vh - 24px);
		overflow-y: auto;
		box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
	}
	.tc .tc-banner > .tc-x { top: 8px; right: 8px; }
	.tc .tc-titolo { font-size: 52px; }
	.tc .tc-head { gap: 12px; }
	.tc .tc-testo { font-size: 14px; line-height: 1.5; }
	.tc .tc-azioni {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
	.tc .tc-azioni .tc-bt { width: 100%; padding: 0 12px; }
	.tc .tc-azioni .tc-bt-pers { grid-column: 1 / -1; order: 3; }

	.tc .tc-pannello { width: 100%; transform: translateY(40px); }
	.tc .tc-p-head { padding: 24px 16px 0; gap: 16px; }
	.tc .tc-intro { margin: 14px 16px 16px; font-size: 14px; }
	.tc .tc-cats { padding: 0 16px; }
	.tc .tc-row { gap: 6px 16px; padding: 16px 0; }
	.tc .tc-row-c { flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
	.tc .tc-stato { font-size: 10px; }
	.tc .tc-desc { font-size: 13px; }
	.tc .tc-piede {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		padding: 16px;
	}
	.tc .tc-piede .tc-bt[data-tc="personalizza_salva"] { grid-column: 1 / -1; order: 3; }
	.tc .tc-id { margin-top: -6px; padding: 0 16px 16px; }

	.tc .tc-angolo {
		left: 16px;
		right: 16px;
		bottom: 16px;
		flex-direction: column-reverse;
		align-items: flex-start;
		gap: 8px;
	}
	.tc .tc-toast { padding: 12px 16px; font-size: 13px; line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
	.tc .tc-banner,
	.tc .tc-velo,
	.tc .tc-pannello,
	.tc .tc-toast,
	.tc .tc-sw .tc-k { transition: none; }
}

@media print {
	.tc { display: none !important; }
}
