/* Studio Torri – banner cookie. Usa i token del tema se presenti. */
.st-cc,
.st-cc-prefs {
	--cc-bg: var(--st-medium-blue, #2e3d51);
	--cc-bg-dark: var(--st-dark-blue, #293444);
	--cc-gold: var(--st-gold-flat, #8f7753);
	--cc-text: var(--st-light-grey, #d9d9d9);
	--cc-strong: var(--st-white, #ececec);
	font-family: var(--st-font-sans, system-ui, sans-serif);
	color: var(--cc-text);
}

.st-cc[hidden] {
	display: none;
}

.st-cc {
	position: fixed;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 9999;
	max-width: 1080px;
	margin-inline: auto;
	background: var(--cc-bg);
	border: 1px solid var(--cc-gold);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.st-cc__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	padding: 22px 26px;
}

.st-cc__text {
	flex: 1 1 auto;
	font-size: 14px;
	line-height: 1.55;
}

.st-cc__text p {
	margin: 0;
}

.st-cc__title {
	margin: 0 0 6px;
	color: var(--cc-gold);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.st-cc a {
	color: var(--cc-strong);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.st-cc-prefs a {
	color: var(--cc-gold);
	text-decoration: underline;
}

.st-cc__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

/* Accetta e Rifiuta hanno lo stesso identico stile (stessa evidenza). */
.st-cc__btn {
	min-width: 120px;
	padding: 11px 22px;
	border: 2px solid var(--cc-gold);
	background: transparent;
	color: var(--cc-strong);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.st-cc__btn:hover,
.st-cc__btn:focus-visible {
	background: var(--cc-gold);
	color: var(--cc-bg-dark);
}

.st-cc__link {
	padding: 8px 4px;
	border: 0;
	background: none;
	color: var(--cc-text);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.st-cc__btn:focus-visible,
.st-cc__link:focus-visible,
.st-cc-prefs__close:focus-visible,
.st-cc-switch input:focus-visible + .st-cc-switch__track {
	outline: 2px solid var(--cc-strong);
	outline-offset: 2px;
}

/* Pannello preferenze */
.st-cc-prefs {
	width: min(620px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 1px solid var(--cc-gold);
	background: var(--cc-bg-dark);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.st-cc-prefs::backdrop {
	background: rgba(20, 26, 35, 0.75);
}

.st-cc-prefs__inner {
	padding: 24px 28px 28px;
	font-size: 14px;
	line-height: 1.55;
}

.st-cc-prefs__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.st-cc-prefs__head .st-cc__title {
	margin: 0;
	font-size: 15px;
}

.st-cc-prefs__close {
	width: 36px;
	height: 36px;
	border: 1px solid var(--cc-gold);
	background: transparent;
	color: var(--cc-gold);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.st-cc-prefs__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 0;
	border-top: 1px solid rgba(217, 217, 217, 0.18);
}

.st-cc-prefs__row p {
	margin: 0;
}

.st-cc-prefs__label {
	margin-bottom: 4px !important;
	color: var(--cc-strong);
	font-weight: 600;
}

.st-cc-prefs__always {
	flex-shrink: 0;
	color: var(--cc-gold);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.st-cc-prefs__policy {
	margin: 4px 0 18px;
	padding-top: 14px;
	border-top: 1px solid rgba(217, 217, 217, 0.18);
}

/* Interruttore */
.st-cc-switch {
	position: relative;
	flex-shrink: 0;
	width: 46px;
	height: 26px;
	cursor: pointer;
}

.st-cc-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.st-cc-switch__track {
	position: absolute;
	inset: 0;
	border: 1px solid var(--cc-gold);
	border-radius: 13px;
	background: transparent;
	pointer-events: none; /* i clic arrivano all'input sottostante */
	transition: background-color 0.2s;
}

.st-cc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--cc-text);
	transition: transform 0.2s;
}

.st-cc-switch input:checked + .st-cc-switch__track {
	background: var(--cc-gold);
}

.st-cc-switch input:checked + .st-cc-switch__track::after {
	transform: translateX(20px);
	background: var(--cc-strong);
}

@media (max-width: 760px) {
	.st-cc__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 18px;
	}

	.st-cc__actions {
		justify-content: stretch;
	}

	.st-cc__btn {
		flex: 1 1 0;
		min-width: 0;
	}

	.st-cc__link {
		flex-basis: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.st-cc-switch__track,
	.st-cc-switch__track::after {
		transition: none;
	}
}
