/*
 * Banner cookie. Palette e caratteri sono quelli del tema:
 * verde oliva #5e6e36, crema #f7f4ef, marrone scuro #36260d, Raleway.
 *
 * Accetta e rifiuta condividono la stessa classe .cc-btn--solid: devono
 * restare visivamente identici, e' un requisito del GDPR.
 */

.cc-banner,
.cc-panel,
.cc-reopen,
.cc-embed__notice {
	font-family: 'Raleway', 'Lato', sans-serif;
	line-height: 1.5;
	box-sizing: border-box;
}

.cc-banner *,
.cc-panel *,
.cc-embed__notice * {
	box-sizing: inherit;
}

.cc-banner[hidden],
.cc-panel[hidden],
.cc-reopen[hidden],
.cc-embed__notice[hidden],
.cc[hidden] {
	display: none;
}

/* --- Banner ------------------------------------------------------------- */

.cc-banner {
	position: fixed;
	z-index: 99999;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 22px 28px;
	background: #36260d;
	color: #f7f4ef;
	box-shadow: 0 -2px 18px rgba(0, 0, 0, .35);
}

.cc-banner__body {
	flex: 1 1 420px;
	min-width: 0;
}

.cc-banner__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
}

.cc-banner__text {
	margin: 0;
	font-size: 14px;
	color: #e6ded1;
}

.cc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

/* --- Pulsanti ----------------------------------------------------------- */

.cc-btn {
	display: inline-block;
	margin: 0;
	padding: 11px 22px;
	border: 2px solid transparent;
	border-radius: 2px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.cc-btn--solid {
	min-width: 150px;
	border-color: #5e6e36;
	background: #5e6e36;
	color: #fff;
}

.cc-btn--solid:hover,
.cc-btn--solid:focus {
	border-color: #75884a;
	background: #75884a;
	color: #fff;
}

.cc-btn--quiet {
	background: transparent;
	border-color: transparent;
	color: #e6ded1;
	text-decoration: underline;
	padding-left: 8px;
	padding-right: 8px;
}

.cc-btn--quiet:hover,
.cc-btn--quiet:focus {
	color: #fff;
}

.cc-btn:focus-visible,
.cc-link:focus-visible,
.cc-switch:focus-visible,
.cc-reopen:focus-visible {
	outline: 3px solid #f0b005;
	outline-offset: 2px;
}

.cc-link {
	color: #e0c05a;
	text-decoration: underline;
}

.cc-link:hover,
.cc-link:focus {
	color: #f0b005;
}

/* --- Pannello di dettaglio ---------------------------------------------- */

.cc-panel {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .6);
	overflow-y: auto;
}

.cc-panel__box {
	width: 100%;
	max-width: 620px;
	max-height: 100%;
	overflow-y: auto;
	padding: 26px 30px 30px;
	background: #f7f4ef;
	color: #36260d;
	border-radius: 3px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}

.cc-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.cc-panel__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #36260d;
	text-transform: none;
	letter-spacing: 0;
}

.cc-panel__close {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #65533d;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.cc-panel__close:hover,
.cc-panel__close:focus {
	color: #36260d;
}

.cc-panel__intro {
	margin: 10px 0 22px;
	font-size: 14px;
	color: #615341;
}

.cc-group {
	padding: 16px 0;
	border-top: 1px solid #ddd5c7;
}

.cc-group__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.cc-group__name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #36260d;
}

label.cc-group__name {
	cursor: pointer;
}

.cc-group__always {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #5e6e36;
}

.cc-group__desc {
	margin: 8px 0 0;
	font-size: 13px;
	color: #615341;
}

/* Interruttore: una checkbox vera, ridisegnata. Resta raggiungibile da tastiera. */
.cc-switch {
	flex: 0 0 auto;
	position: relative;
	width: 50px;
	height: 26px;
	margin: 0;
	border-radius: 13px;
	background: #b9b0a1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color .15s ease;
}

.cc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}

.cc-switch:checked {
	background: #5e6e36;
}

.cc-switch:checked::after {
	transform: translateX(24px);
}

.cc-panel__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid #ddd5c7;
}

.cc-panel__actions .cc-btn {
	flex: 1 1 160px;
}

.cc-panel__policy {
	margin: 18px 0 0;
	font-size: 13px;
}

.cc-panel__policy .cc-link {
	color: #7a6414;
}

body.cc-locked {
	overflow: hidden;
}

/* --- Richiamo permanente delle preferenze -------------------------------- */

.cc-reopen {
	position: fixed;
	z-index: 99998;
	left: 14px;
	bottom: 14px;
	padding: 8px 14px;
	border: 1px solid rgba(247, 244, 239, .35);
	border-radius: 2px;
	background: rgba(54, 38, 13, .88);
	color: #f7f4ef;
	font-family: 'Raleway', 'Lato', sans-serif;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
}

.cc-reopen:hover,
.cc-reopen:focus {
	background: #36260d;
	color: #fff;
}

/* --- Contenuti di terze parti bloccati ----------------------------------- */

.cc-embed {
	position: relative;
	min-height: 450px;
	background: #e8e3da;
}

.cc-embed iframe {
	display: block;
	width: 100%;
	height: 450px;
	border: 0;
}

.cc-embed__notice {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 26px;
	text-align: center;
	background: #e8e3da;
	color: #36260d;
}

.cc-embed__text {
	max-width: 46ch;
	margin: 0;
	font-size: 14px;
	color: #615341;
}

.cc-embed__policy {
	font-size: 13px;
	color: #7a6414;
}

/* --- Schermi stretti ------------------------------------------------------ */

@media (max-width: 767px) {
	.cc-banner {
		flex-direction: column;
		align-items: stretch;
		padding: 18px 20px;
		max-height: 85vh;
		overflow-y: auto;
	}

	/* In colonna flex-basis vale sull'altezza: senza questo il testo si
	   prenderebbe 420px di altezza, aprendo un vuoto sopra i pulsanti. */
	.cc-banner__body {
		flex: 0 1 auto;
	}

	.cc-banner__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.cc-btn--solid {
		width: 100%;
	}

	.cc-panel__box {
		padding: 20px;
	}

	.cc-panel__actions .cc-btn {
		flex: 1 1 100%;
	}
}
