/* ==========================================================================
   CDA Net Funzioni 0.2.0 · banner dei cookie e pannello "Personalizza"
   Made by Team CDA Net AS200034
   Ripreso dal tema CDA Net 0.2.1 con i colori scritti per intero (con Divi non
   ci sono le variabili del tema). Si carica solo quando il banner è attivo.
   Il banner sta sopra quasi tutto (z-index 99990): se la chat 3CX lo copre,
   vedi LEGGIMI-plugin.md.
   ========================================================================== */

@font-face {
	font-family: "cda-jakarta";
	src: url(../fonts/plus-jakarta-sans-latin.woff2) format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

.cda-cookie {
	font-family: "cda-jakarta", system-ui, sans-serif;
}

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

.cda-cookie__titolo,
.cda-cookie__pannello-titolo {
	font-family: "cda-jakarta", system-ui, sans-serif;
	color: #0B2545;
	line-height: 1.2;
	padding: 0;
}

.cda-cookie p {
	padding: 0;
}

.cda-cookie-apri {
	cursor: pointer;
}

.cda-cookie__banner {
	position: fixed;
	z-index: 99990;
	inset-inline: 1rem;
	bottom: 1rem;
	max-width: 46rem;
	margin-inline: auto;
	padding: 1.25rem 1.25rem 1.1rem;
	background: #F4F7FA;
	color: #0B2545;
	border: 1px solid #D9DCDF;
	border-top: 3px solid #FF9933;
	border-radius: 8px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
	font-size: 0.95rem;
	line-height: 1.5;
	animation: cda-cookie-entra 0.28s ease-out both;
}

.cda-cookie__banner[hidden] {
	display: none;
}

/*
 * Mentre il banner è aperto la bolla della chat (3CX) non deve coprire i
 * pulsanti. I nomi qui sotto sono quelli usati di solito dal widget 3CX:
 * da provare su staging con il widget vero.
 */
html.cda-cookie-aperto call-us-selector,
html.cda-cookie-aperto call-us,
html.cda-cookie-aperto #callus-container,
html.cda-cookie-aperto #wplc-chat-button,
html.cda-cookie-aperto #wp-live-chat-by-3CX {
	display: none !important;
}

@keyframes cda-cookie-entra {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cda-cookie__banner {
		animation: none;
}
}

.cda-cookie__titolo {
	margin: 0 2.75rem 0.4rem 0;
	font-family: "cda-jakarta", system-ui, sans-serif;
	font-size: 1.1rem;
	font-weight: 700;
}

.cda-cookie__testo,
.cda-cookie__link {
	margin: 0 0 0.6rem;
}

.cda-cookie a {
	color: #9A4D00;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.cda-cookie__azioni {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.9rem;
}

.cda-cookie__btn {
	flex: 1 1 10rem;
	min-height: 44px;
	padding: 0.65rem 1.1rem;
	border: 0;
	border-radius: 6px;
	background: #FF9933;
	color: #0B2545;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.cda-cookie__btn:hover {
	background: color-mix(in srgb, #FF9933 78%, #ffffff);
}

.cda-cookie__btn--testo {
	background: transparent;
	color: #0B2545;
	border: 1.5px solid #FF9933;
}

.cda-cookie__btn--testo:hover {
	background: rgba(255, 153, 51, 0.14);
}

.cda-cookie__x {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #0B2545;
	cursor: pointer;
}

.cda-cookie__x:hover {
	background: #D9DCDF;
}

.cda-cookie :is(a, button, input):focus-visible {
	outline: 3px solid #9A4D00;
	outline-offset: 2px;
}

.cda-cookie__banner:focus {
	outline: none;
}

.cda-cookie__pannello {
	width: min(40rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	padding: 0;
	background: #F4F7FA;
	color: #0B2545;
	border: 1px solid #D9DCDF;
	border-top: 3px solid #FF9933;
	border-radius: 8px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.cda-cookie__pannello::backdrop {
	background: rgba(5, 8, 12, 0.7);
}

.cda-cookie__pannello--senza-dialog[open] {
	position: fixed;
	inset: 1rem;
	z-index: 99995;
	margin: auto;
	overflow: auto;
}

.cda-cookie__pannello-corpo {
	position: relative;
	padding: 1.4rem 1.25rem 1.2rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

.cda-cookie__pannello-titolo {
	margin: 0 2.75rem 0.5rem 0;
	font-size: 1.3rem;
}

.cda-cookie__categorie {
	list-style: none;
	margin: 0.75rem 0 0.75rem;
	padding: 0;
}

.cda-cookie__categoria {
	padding: 0.8rem 0;
	border-top: 1px solid #D9DCDF;
}

.cda-cookie__riga {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.cda-cookie__riga label {
	font-weight: 600;
	cursor: pointer;
}

.cda-cookie__riga input {
	width: 1.35rem;
	height: 1.35rem;
	margin: 0;
	accent-color: #FF9933;
	flex: none;
}

.cda-cookie__sempre {
	margin-left: auto;
	font-size: 0.85rem;
	color: #4A5568;
}

.cda-cookie__desc {
	margin: 0.3rem 0 0 2rem;
	color: #4A5568;
	font-size: 0.9rem;
}

@media (max-width: 599px) {
	.cda-cookie__banner {
		inset-inline: 0.5rem;
		bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
		padding: 1rem 0.9rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
		max-height: calc(100vh - 1rem);
		overflow: auto;
}

	.cda-cookie__btn {
		flex: 1 1 calc(50% - 0.3rem);
}

	.cda-cookie__btn--testo {
		flex-basis: 100%;
}
}


.cda-cookie-tabella-wrap {
	overflow-x: auto;
}

.cda-cookie-tabella table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.cda-cookie-tabella th,
.cda-cookie-tabella td {
	padding: 0.6rem 0.7rem;
	border: 1px solid #D9DCDF;
	text-align: start;
	vertical-align: top;
}

.cda-cookie-tabella thead th {
	background: #FFFFFF;
}

.cda-cookie-tabella code {
	font-size: 0.9em;
	white-space: nowrap;
}

@media (max-width: 699px) {
	.cda-cookie-tabella thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
}

	.cda-cookie-tabella table,
	.cda-cookie-tabella tbody,
	.cda-cookie-tabella tr,
	.cda-cookie-tabella td {
		display: block;
		width: 100%;
}

	.cda-cookie-tabella tr {
		margin-bottom: 1rem;
		border: 1px solid #D9DCDF;
		border-radius: 8px;
		overflow: hidden;
}

	.cda-cookie-tabella td {
		border: 0;
		border-top: 1px solid #D9DCDF;
}

	.cda-cookie-tabella td:first-child {
		border-top: 0;
		background: #FFFFFF;
		font-weight: 600;
}

	.cda-cookie-tabella td[data-etichetta]::before {
		content: attr(data-etichetta) ": ";
		font-weight: 600;
		color: #4A5568;
}
}

.cda-da-confermare {
	padding: 0 0.35em;
	border-radius: 4px;
	background: #ffd84d;
	color: #0B2545;
	font-size: 0.85em;
	font-weight: 700;
}

.cda-cookie-tabella-wrap:focus-visible {
	outline: 3px solid #9A4D00;
	outline-offset: 3px;
}
