/* PCRT Cookie Consent - stili del banner, del pannello e dei segnaposto. */
:root {
	--pcrtcookie-bg: #ffffff;
	--pcrtcookie-fg: #1a1a1a;
	--pcrtcookie-muted: #4a4a4a;
	--pcrtcookie-accent: #0b4f8a;
	--pcrtcookie-accent-fg: #ffffff;
	--pcrtcookie-border: #c9ced6;
	--pcrtcookie-ph-bg: #f2f4f7;
	--pcrtcookie-radius: 6px;
	--pcrtcookie-shadow: 0 -2px 16px rgba(0, 0, 0, 0.18);
	--pcrtcookie-z: 10000;
	--pcrtcookie-font: inherit;
}

.pcrtcookie,
.pcrtcookie * {
	box-sizing: border-box;
}

.pcrtcookie {
	font-family: var(--pcrtcookie-font);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--pcrtcookie-fg);
}

.pcrtcookie[hidden],
.pcrtcookie [hidden] {
	display: none !important;
}

/* Banner */
.pcrtcookie__banner {
	position: fixed;
	z-index: var(--pcrtcookie-z);
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--pcrtcookie-bg);
	box-shadow: var(--pcrtcookie-shadow);
	padding: 1.25rem 3.25rem 1.25rem 1.25rem;
	border-top: 1px solid var(--pcrtcookie-border);
}

.pcrtcookie--box .pcrtcookie__banner {
	left: 1rem;
	right: auto;
	bottom: 1rem;
	max-width: 26rem;
	border: 1px solid var(--pcrtcookie-border);
	border-radius: var(--pcrtcookie-radius);
}

@media (max-width: 36rem) {
	.pcrtcookie--box .pcrtcookie__banner {
		left: 0;
		right: 0;
		bottom: 0;
		max-width: none;
		border-radius: 0;
	}
}

.pcrtcookie--bar .pcrtcookie__banner > * {
	max-width: 72rem;
	margin-left: auto;
	margin-right: auto;
}

.pcrtcookie__banner:focus,
.pcrtcookie__prefs:focus {
	outline: none;
}

.pcrtcookie__title {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.pcrtcookie__text {
	margin: 0 0 1rem;
	color: var(--pcrtcookie-muted);
}

.pcrtcookie__text a {
	color: var(--pcrtcookie-accent);
	text-decoration: underline;
}

.pcrtcookie__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* I tre pulsanti hanno lo stesso risalto (Garante 10/06/2021). */
.pcrtcookie__btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	margin: 0;
	padding: 0.6rem 1.25rem;
	font: inherit;
	font-weight: 600;
	line-height: 1.25;
	color: var(--pcrtcookie-accent-fg);
	background: var(--pcrtcookie-accent);
	border: 2px solid var(--pcrtcookie-accent);
	border-radius: var(--pcrtcookie-radius);
	cursor: pointer;
	text-decoration: none;
}

.pcrtcookie__btn:hover {
	filter: brightness(0.9);
}

.pcrtcookie__btn:focus-visible,
.pcrtcookie__close:focus-visible,
.pcrtcookie-footer__btn:focus-visible,
.pcrtcookie__cat input:focus-visible {
	outline: 3px solid #ff9900;
	outline-offset: 2px;
}

.pcrtcookie__btn--link {
	color: var(--pcrtcookie-accent);
	background: transparent;
	border-color: transparent;
	text-decoration: underline;
}

.pcrtcookie__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--pcrtcookie-fg);
	background: transparent;
	border: 0;
	border-radius: var(--pcrtcookie-radius);
	cursor: pointer;
}

.pcrtcookie__close:hover {
	background: var(--pcrtcookie-ph-bg);
}

/* Pannello preferenze */
.pcrtcookie__overlay {
	position: fixed;
	z-index: calc(var(--pcrtcookie-z) + 1);
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.55);
}

.pcrtcookie__prefs {
	position: relative;
	width: 100%;
	max-width: 40rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 1.5rem 1.5rem 1.25rem;
	background: var(--pcrtcookie-bg);
	border-radius: var(--pcrtcookie-radius);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pcrtcookie__prefs .pcrtcookie__title {
	padding-right: 2.5rem;
}

.pcrtcookie__cats {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
}

.pcrtcookie__cat {
	padding: 0.75rem 0;
	border-top: 1px solid var(--pcrtcookie-border);
}

.pcrtcookie__cat-head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.pcrtcookie__cat input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	flex: none;
	accent-color: var(--pcrtcookie-accent);
}

.pcrtcookie__cat label {
	margin: 0;
	font-weight: 700;
	cursor: pointer;
}

.pcrtcookie__always {
	font-size: 0.85em;
	color: var(--pcrtcookie-muted);
}

.pcrtcookie__cat-desc {
	margin: 0.35rem 0 0 1.85rem;
	font-size: 0.95em;
	color: var(--pcrtcookie-muted);
}

html.pcrtcookie-modal {
	overflow: hidden;
}

/* Segnaposto dei contenuti bloccati */
.pcrtcookie-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 12rem;
	margin: 0 0 1rem;
	padding: 1.5rem;
	text-align: center;
	color: var(--pcrtcookie-fg);
	background: var(--pcrtcookie-ph-bg);
	border: 1px dashed var(--pcrtcookie-border);
	border-radius: var(--pcrtcookie-radius);
}

.pcrtcookie-ph p {
	margin: 0;
	max-width: 36rem;
}

.pcrtcookie-ph__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

/* Pulsante nel footer */
.pcrtcookie-footer {
	margin: 0;
	padding: 0.5rem 1rem;
	text-align: center;
}

.pcrtcookie-footer__btn {
	appearance: none;
	-webkit-appearance: none;
	padding: 0.25rem 0.5rem;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
	.pcrtcookie__banner {
		animation: pcrtcookie-in 0.25s ease-out;
	}

	@keyframes pcrtcookie-in {
		from { transform: translateY(1rem); opacity: 0; }
		to { transform: none; opacity: 1; }
	}
}

@media print {
	.pcrtcookie,
	.pcrtcookie-footer {
		display: none !important;
	}
}
