/* Banner cookie
   Una scheda contenuta, non una fascia a tutta larghezza: la fascia verde
   spezza in due la pagina e fa sembrare il sito rotto. Qui sta in un angolo,
   nei colori del brand, e non urla. */

.vf-cookie {
	position: fixed;
	z-index: 80;
	inset: auto 1rem 1rem 1rem;
	max-width: 34rem;
	padding: 1.25rem 1.375rem;
	background: var( --wp--preset--color--avorio );
	color: var( --wp--preset--color--marrone );
	border-top: 2px solid var( --wp--preset--color--oro );
	border-radius: 2px;
	box-shadow: 0 8px 32px rgba( 24, 34, 27, 0.22 );
}

.vf-cookie[hidden] {
	display: none;
}

.vf-cookie__testo {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var( --wp--preset--color--grigio-testo );
}

.vf-cookie__testo a {
	color: var( --wp--preset--color--verde );
	text-underline-offset: 2px;
}

.vf-cookie__azioni {
	display: flex;
	gap: 0.625rem;
}

.vf-cookie__azioni .vf-bottone {
	flex: 1 1 0;
	min-height: 2.625rem;
	padding-inline: 1rem;
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	white-space: nowrap;
}

/* Il rifiuto non è nascosto né spento: deve costare quanto l'accettazione,
   altrimenti la scelta non è libera. */
.vf-cookie .vf-bottone--contorno {
	background: transparent;
	border-color: rgba( 92, 59, 40, 0.3 );
	color: var( --wp--preset--color--marrone );
}

.vf-cookie .vf-bottone--contorno:hover,
.vf-cookie .vf-bottone--contorno:focus-visible {
	background: rgba( 92, 59, 40, 0.06 );
	border-color: var( --wp--preset--color--marrone );
	color: var( --wp--preset--color--marrone );
}

/* Riapertura dal piè di pagina */

.vf-cookie__riapri {
	padding: 0;
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.vf-cookie__riapri:hover,
.vf-cookie__riapri:focus-visible {
	color: var( --wp--preset--color--oro-testo );
}

@media ( min-width: 40rem ) {
	.vf-cookie {
		inset: auto auto 1.5rem 1.5rem;
		padding: 1.5rem;
	}

	.vf-cookie__azioni .vf-bottone {
		flex: 0 0 auto;
	}
}

@media ( prefers-reduced-motion: no-preference ) {
	.vf-cookie {
		animation: vf-cookie-entra 0.35s ease-out both;
	}

	@keyframes vf-cookie-entra {
		from { opacity: 0; transform: translateY( 0.75rem ); }
		to   { opacity: 1; transform: none; }
	}
}
