/* Teknet Consent — banner. Colori dal tema se disponibili, con valori di riserva a contrasto AA. */
.tkc {
	--tkc-bg: var(--wp--preset--color--bianco, #fff);
	--tkc-fg: var(--wp--preset--color--inchiostro, #14181f);
	--tkc-pri: var(--wp--preset--color--primario-scuro, #0a4f8a);
	--tkc-pri-fg: #fff;
	position: fixed;
	inset: auto 0 0 0;
	z-index: 100000;
	padding: 1rem;
	display: flex;
	justify-content: center;
	pointer-events: none;
}
.tkc[hidden] { display: none; }
.tkc__box {
	pointer-events: auto;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 46rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	background: var(--tkc-bg);
	color: var(--tkc-fg);
	border: 2px solid var(--tkc-fg);
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
	padding: 1.5rem 1.5rem 1rem;
	font-size: 1rem;
	line-height: 1.5;
}
.tkc__title { margin: 0 2.5rem .5rem 0; font-size: 1.25rem; line-height: 1.3; }
.tkc__title:focus { outline: none; }
.tkc__title:focus-visible { outline: 3px solid var(--tkc-pri); outline-offset: 2px; }
.tkc__text { margin: 0 0 1rem; }
.tkc__text a, .tkc__cat a { color: var(--tkc-pri); text-decoration: underline; }
.tkc__close {
	position: absolute; top: .5rem; right: .5rem;
	width: 2.75rem; height: 2.75rem;
	border: 0; background: transparent; color: var(--tkc-fg);
	font-size: 1.75rem; line-height: 1; cursor: pointer; border-radius: 4px;
}
.tkc__close:hover { background: rgba(0, 0, 0, .08); }
.tkc__prefs fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
.tkc__legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.tkc__cat { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: center; padding: .75rem 0; border-top: 1px solid rgba(0, 0, 0, .15); }
.tkc__cat input { width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--tkc-pri); }
.tkc__cat label { font-weight: 700; cursor: pointer; }
.tkc__cat p { grid-column: 2; margin: 0; font-size: .9375rem; }
.tkc__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; }
.tkc__btn {
	flex: 1 1 10rem;
	min-height: 2.75rem;
	padding: .625rem 1.25rem;
	font: inherit; font-weight: 700;
	border: 2px solid var(--tkc-pri);
	background: var(--tkc-pri); color: var(--tkc-pri-fg);
	border-radius: 6px; cursor: pointer;
}
.tkc__btn--ghost { background: transparent; color: var(--tkc-pri); }
.tkc__btn:hover { filter: brightness(1.15); text-decoration: underline; }
.tkc__btn[hidden] { display: none; }
.tkc__status { margin: 0; min-height: 0; font-size: .875rem; }
.tkc :focus-visible { outline: 3px solid var(--wp--preset--color--accento, #f5b800) !important; box-shadow: 0 0 0 6px var(--tkc-fg) !important; }
html[data-contrast="alto"] .tkc { --tkc-bg: #000; --tkc-fg: #fff; --tkc-pri: #ffd83d; --tkc-pri-fg: #000; }
@media (prefers-reduced-motion: no-preference) {
	.tkc__box { animation: tkc-in .2s ease-out; }
	@keyframes tkc-in { from { transform: translateY(1rem); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media print { .tkc { display: none !important; } }
