/* Sphere Cookie Banner v1 — CSS dedicato per template legacy (basic.php).
 * 2026-06-03. Unit scale 5/15/30/60 canonical KB.
 *
 * Scope: #sp-cookie-banner (banner principale) + .sp-cookie-modal (modal /cookie-settings).
 */

/* ────────── Banner principale ────────── */
#sp-cookie-banner.is-hidden { display: none !important; }
#sp-cookie-banner.sp-cookie-banner--v1 {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: fit-content;
	max-width: calc(100vw - 60px);
	background: #fff;
	color: #222;
	border-radius: 15px;
	box-shadow: 0 15px 60px rgba(0,0,0,0.22);
	padding: 30px;
	z-index: 100;
	line-height: 1.55;
}
#sp-cookie-banner.sp-cookie-banner--v1 .sp-cookie-banner__msg {
	margin-bottom: 15px;
}
#sp-cookie-banner.sp-cookie-banner--v1 .sp-cookie-banner__title {
	margin-top: 0;
}
#sp-cookie-banner.sp-cookie-banner--v1 .sp-cookie-banner__actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 15px;
	justify-content: center;
}
@media (max-width: 720px) {
	#sp-cookie-banner.sp-cookie-banner--v1 {
		bottom: 15px;
		right: 15px;
		left: 15px;
		width: auto;
		max-width: none;
		padding: 15px;
	}
	#sp-cookie-banner.sp-cookie-banner--v1 .sp-cookie-banner__actions {
		flex-wrap: wrap;
	}
}

/* ────────── Modal /cookie-settings (wrapper .sp-cookie-modal) ────────── */
/* DESKTOP base — DEVONO STARE PRIMA della media (max-width: 900px) altrimenti
 * la regola desktop "white-space: nowrap" sovrascrive il mobile "normal" anche
 * sotto 900px (cascade order = stessa specificity → vince ultima).
 */
.sp-cookie-modal {
	background: #fff;
	color: #222;
	max-width: 50%;
	width: 90vw;
	margin: 60px auto;
	border-radius: 15px;
	box-shadow: 0 30px 60px rgba(0,0,0,0.45);
	padding: 30px;
	box-sizing: border-box;
	max-height: calc(100vh - 60px);
	overflow-y: auto;
}
.sp-cookie-modal .sp-main-content-content {
	padding: 0 30px !important;
	margin: 0 !important;
}
.sp-cookie-modal h1 {
	margin: 0 0 15px;
	color: #222;
}
.sp-cookie-modal .sp-main-content-content > div {
	color: #555;
	line-height: 1.55;
}
.sp-cookie-modal .sp-des-page {
	margin-top: 30px;
	margin-bottom: 0;
	padding: 30px !important;
	padding-bottom: 0 !important;
}
.sp-cookie-modal .sp-public-desbar {
	margin-top: 30px;
	display: flex;
	flex-wrap: nowrap;
	gap: 15px;
	justify-content: flex-end;
}
.sp-cookie-modal .sp-public-desbar > .sp-button {
	white-space: nowrap;
	flex-shrink: 0;
}

/* MOBILE override — sotto 900px stack verticale, padding ridotto, wrap testo */
@media (max-width: 900px) {
	.sp-cookie-modal { max-width: 90vw; padding: 15px; }
	.sp-cookie-modal .sp-main-content-content { padding: 0 15px !important; }
	.sp-cookie-modal .sp-des-page { padding: 15px !important; padding-bottom: 0 !important; margin-top: 15px; }
	.sp-cookie-modal .sp-public-desbar {
		flex-direction: column;
		flex-wrap: wrap;
		margin-top: 15px;
		gap: 5px;
		justify-content: stretch;
	}
	.sp-cookie-modal .sp-public-desbar > .sp-button {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
		white-space: normal;
	}
}

/* Z-index: modal sopra banner cookie */
.sp-modal { z-index: 9999 !important; }
