/* ==========================================================================
   Andrea Paolucci - Banner dei cookie (solo se è impostato GTM).
   "Accetto" e "Rifiuto" hanno lo stesso peso, come chiede il Garante.
   ========================================================================== */

.ap-consent {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 1000;
	box-sizing: border-box;
	width: min(420px, calc(100vw - 48px));
	padding: var(--space-6) var(--space-6) var(--space-5);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	background: var(--surface-raised);
	box-shadow: var(--shadow-lg);
	color: var(--text-body);
	animation: ap-consent-in var(--duration-slow) var(--ease-out);
}
.ap-consent[hidden] {
	display: none;
}
@keyframes ap-consent-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}
@media (prefers-reduced-motion: reduce) {
	.ap-consent {
		animation: none;
	}
}

.ap-consent__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: none;
	color: var(--text-muted);
	cursor: pointer;
}
.ap-consent__close:hover {
	background: var(--surface-sunken);
	color: var(--text-body);
}
.ap-consent__close .ap-icon {
	width: 18px;
	height: 18px;
}

.ap-consent__title {
	margin: 0 var(--space-6) var(--space-2) 0;
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.3;
}
.ap-consent__text {
	margin: 0;
	color: var(--text-muted);
	font-size: .9375rem;
	line-height: 1.55;
}
.ap-consent__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-3);
	margin-top: var(--space-5);
}
.ap-consent__btn {
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid var(--neutral-800);
	border-radius: var(--radius-pill);
	background: var(--neutral-800);
	color: var(--neutral-050);
	font-family: var(--font-sans);
	font-size: .9375rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.ap-consent__btn:hover {
	border-color: var(--brand-red-500);
	background: var(--brand-red-500);
}
.ap-consent button:focus-visible {
	outline: 0;
	box-shadow: var(--ring-focus);
}

/* Link nella riga legale del footer */
.ap-footer__consent {
	color: var(--neutral-400);
}

@media (max-width: 600px) {
	.ap-consent {
		right: 12px;
		bottom: 12px;
		left: 12px;
		width: auto;
		padding: var(--space-5);
	}
}
