/**
 * Banner cookie e pannello preferenze.
 * I due pulsanti di scelta hanno pari evidenza grafica,
 * come richiesto dalle Linee guida del Garante del 10 giugno 2021.
 */

/* Deve battere il display:flex dichiarato piu' sotto: senza questa regola
   il pannello preferenze resterebbe visibile al primo caricamento. */
.flt-cookie-banner[hidden],
.flt-cookie-prefs[hidden] {
	display: none !important;
}

.flt-cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: #0b0b0d;
	color: #fff;
	border-top: 3px solid #d4af37;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
	animation: flt-cookie-in 0.25s ease-out;
}

@keyframes flt-cookie-in {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.flt-cookie-banner { animation: none; }
}

.flt-cookie-banner__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1rem 2rem;
	align-items: center;
}

.flt-cookie-banner h2 {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 1.05rem;
	color: #f0d78a;
}

.flt-cookie-banner p {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
}

.flt-cookie-banner a {
	color: #f0d78a;
	text-decoration: underline;
}

.flt-cookie-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: flex-end;
}

.flt-cookie-banner__actions .flt-btn {
	padding: 10px 18px;
	font-size: 0.88rem;
	white-space: nowrap;
}

.flt-cookie-banner__actions .flt-btn--ghost {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.55);
}

.flt-cookie-banner__actions .flt-btn--ghost:hover {
	border-color: #f0d78a;
	color: #f0d78a;
}

/* --- Pannello preferenze --- */

.flt-cookie-prefs {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(10, 10, 12, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow-y: auto;
}

.flt-cookie-prefs__panel {
	width: 100%;
	max-width: 540px;
	background: #fff;
	color: #16161a;
	border-radius: 14px;
	padding: 1.75rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.flt-cookie-prefs__panel h2 {
	margin: 0 0 1rem;
	font-size: 1.2rem;
}

.flt-cookie-cat {
	padding: 0.85rem 0;
	border-bottom: 1px solid #e3e3e8;
}

.flt-cookie-cat label {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.98rem;
	cursor: pointer;
}

.flt-cookie-cat input[disabled] {
	cursor: not-allowed;
}

.flt-cookie-cat p {
	margin: 0.4rem 0 0 1.85rem;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #6b6b76;
}

.flt-cookie-prefs__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: flex-end;
	margin-top: 1.25rem;
}

.flt-cookie-prefs__actions .flt-btn--ghost {
	color: #16161a;
	border-color: #c9c9d1;
}

/* Nel pannello il fondo e bianco: il pulsante neutro va reso visibile. */
.flt-cookie-prefs .flt-btn--neutro {
	background: #f1efe8;
	border-color: #cfcabb;
	color: #16161a;
	box-shadow: none;
}

.flt-cookie-prefs .flt-btn--neutro:hover {
	background: #e7e4da;
	border-color: #b8b2a1;
}

.flt-cookie-prefs__note {
	margin: 1rem 0 0;
	font-size: 0.8rem;
	color: #6b6b76;
}

@media (max-width: 780px) {
	.flt-cookie-banner__inner {
		grid-template-columns: 1fr;
		padding: 1rem 1.15rem;
	}

	.flt-cookie-banner__actions {
		justify-content: stretch;
	}

	.flt-cookie-banner__actions .flt-btn {
		flex: 1 1 auto;
		text-align: center;
	}
}
