/* CST GDPR Suite — cookie banner */

.cst-gdpr-banner {
	position: fixed;
	inset: auto 16px 16px 16px;
	z-index: 99990;
	max-width: 640px;
	margin: 0 auto;
	left: 0;
	right: 0;
}

.cst-gdpr-banner__inner {
	position: relative;
	padding: 24px 24px 20px;
	background: #f4f9f9;
	border: 1px solid #b8cfcf;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(10, 47, 47, 0.18);
}

.cst-gdpr-banner__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: #3d5c5c;
	cursor: pointer;
	border-radius: 8px;
}

.cst-gdpr-banner__close:hover {
	background: #dce8e8;
}

.cst-gdpr-banner__title {
	margin: 0 0 10px;
	font-size: 1.125rem;
	font-weight: 700;
	color: #0a2f2f;
}

.cst-gdpr-banner__text {
	margin: 0 0 12px;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: #3d5c5c;
}

.cst-gdpr-banner__links {
	margin: 0 0 18px;
	font-size: 0.875rem;
}

.cst-gdpr-banner__links a {
	color: #0f6b6b;
	font-weight: 600;
	text-decoration: underline;
}

.cst-gdpr-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cst-gdpr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 8px;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cst-gdpr-btn--primary {
	background: #0f6b6b;
	color: #fff;
	border-color: #0f6b6b;
}

.cst-gdpr-btn--primary:hover {
	background: #0c5555;
	border-color: #0c5555;
}

.cst-gdpr-btn--outline {
	background: transparent;
	color: #0f6b6b;
	border-color: #0f6b6b;
}

.cst-gdpr-btn--outline:hover {
	background: #e6f2f2;
}

.cst-gdpr-btn--ghost {
	background: #dce8e8;
	color: #0a2f2f;
	border-color: #b8cfcf;
}

.cst-gdpr-btn--ghost:hover {
	background: #cfdcdc;
}

/* Modal preferenze */

.cst-gdpr-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.cst-gdpr-modal[hidden],
.cst-gdpr-banner[hidden] {
	display: none !important;
}

.cst-gdpr-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 47, 47, 0.55);
}

.cst-gdpr-modal__panel {
	position: relative;
	width: min(560px, 100%);
	max-height: 90vh;
	overflow: auto;
	padding: 28px 24px 24px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.cst-gdpr-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	cursor: pointer;
	color: #3d5c5c;
}

.cst-gdpr-modal__title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	color: #0a2f2f;
}

.cst-gdpr-modal__intro {
	margin: 0 0 20px;
	font-size: 0.9375rem;
	color: #3d5c5c;
	line-height: 1.6;
}

.cst-gdpr-pref {
	padding: 16px 0;
	border-top: 1px solid #dce8e8;
}

.cst-gdpr-pref p {
	margin: 8px 0 0;
	font-size: 0.875rem;
	color: #5a7a7a;
	line-height: 1.55;
}

.cst-gdpr-pref__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.cst-gdpr-pref__always {
	font-size: 0.75rem;
	font-weight: 600;
	color: #0f6b6b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cst-gdpr-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.cst-gdpr-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.cst-gdpr-switch span {
	position: absolute;
	inset: 0;
	background: #b8cfcf;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s;
}

.cst-gdpr-switch span::before {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
}

.cst-gdpr-switch input:checked + span {
	background: #0f6b6b;
}

.cst-gdpr-switch input:checked + span::before {
	transform: translateX(20px);
}

.cst-gdpr-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

/* Pulsante riapri preferenze */

.cst-gdpr-reopen {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99980;
	padding: 8px 14px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #0a2f2f;
	background: #f4f9f9;
	border: 1px solid #b8cfcf;
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(10, 47, 47, 0.12);
	cursor: pointer;
}

.cst-gdpr-reopen:hover {
	background: #e6f2f2;
}

.cst-gdpr-reopen[hidden] {
	display: none !important;
}

/* Form contatti bloccato senza consenso funzionali */

.cst-gdpr-form-notice {
	margin: 0 0 16px;
	padding: 14px 16px;
	font-size: 0.875rem;
	line-height: 1.55;
	color: #7f1d1d;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
}

.cst-gdpr-form-notice[hidden] {
	display: none !important;
}

.cst-gdpr-form--locked .wpcf7-form {
	opacity: 0.55;
}

.cst-gdpr-form--locked input:not([type="hidden"]),
.cst-gdpr-form--locked textarea,
.cst-gdpr-form--locked select,
.cst-gdpr-form--locked button {
	cursor: not-allowed;
}

@media (max-width: 600px) {
	.cst-gdpr-banner {
		inset: auto 10px 10px 10px;
	}

	.cst-gdpr-banner__actions,
	.cst-gdpr-modal__actions {
		flex-direction: column;
	}

	.cst-gdpr-btn {
		width: 100%;
	}
}
