/* =====================================================================
 * San Bernardo Cookie Consent — banner informativa
 * Stile ispirato al widget cookie di iubenda (HK Grotesk, card chiara,
 * angoli arrotondati, ombra morbida).
 * ================================================================== */

@font-face {
	font-family: "HK Grotesk";
	src: url("../fonts/HKGrotesk-Regular.woff2") format("woff2"),
	     url("../fonts/HKGrotesk-Regular.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "HK Grotesk";
	src: url("../fonts/HKGrotesk-Bold.woff2") format("woff2"),
	     url("../fonts/HKGrotesk-Bold.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

#sbcc-root {
	--sbcc-teal: #1E6164;
	--sbcc-cyan: #17AECD;
	--sbcc-cyan-dark: #1596b0;
	--sbcc-ink: #2b2b2b;
	--sbcc-muted: #5c5c5c;
	--sbcc-border: #e3e6e8;
	--sbcc-radius: 10px;
	font-family: "HK Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#sbcc-root *,
#sbcc-root *::before,
#sbcc-root *::after {
	box-sizing: border-box;
}

/* ---------- banner ------------------------------------------------- */

#sbcc-banner {
	position: fixed;
	z-index: 999999;
	left: 24px;
	bottom: 24px;
	width: 420px;
	max-width: calc(100vw - 48px);
	background: #ffffff;
	color: var(--sbcc-ink);
	border: 1px solid var(--sbcc-border);
	border-radius: var(--sbcc-radius);
	box-shadow: 0 12px 40px rgba(15, 33, 34, 0.22);
	padding: 22px 24px 20px;
	animation: sbcc-rise 0.28s ease;
}

@keyframes sbcc-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.sbcc-banner-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.sbcc-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(23, 174, 205, 0.12);
	color: var(--sbcc-teal);
	flex-shrink: 0;
}

#sbcc-banner h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sbcc-ink);
}

.sbcc-banner-body {
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--sbcc-muted);
	max-height: 34vh;
	overflow-y: auto;
}

.sbcc-banner-body p {
	margin: 0;
}

#sbcc-root a {
	color: var(--sbcc-teal);
	text-decoration: underline;
	text-underline-offset: 2px;
}

#sbcc-root a:hover {
	color: var(--sbcc-cyan-dark);
}

.sbcc-banner-actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

/* ---------- buttons --------------------------------------------------- */

.sbcc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 10px 18px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.1;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
	white-space: nowrap;
}

.sbcc-btn:focus-visible {
	outline: 3px solid rgba(23, 174, 205, 0.45);
	outline-offset: 2px;
}

.sbcc-btn-primary {
	background: var(--sbcc-cyan);
	color: #fff;
	flex: 1 1 auto;
}

.sbcc-btn-primary:hover {
	background: var(--sbcc-cyan-dark);
	color: #fff;
}

.sbcc-btn-ghost {
	background: transparent;
	color: var(--sbcc-muted);
	border-color: var(--sbcc-border);
}

.sbcc-btn-ghost:hover {
	background: #f4f6f7;
	color: var(--sbcc-ink);
}

.sbcc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 30px;
	height: 30px;
	border: none;
	background: transparent;
	color: #9aa2a4;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
}

.sbcc-close:hover {
	color: var(--sbcc-ink);
	background: #f0f2f3;
}

/* ---------- responsive -------------------------------------------- */

@media (max-width: 600px) {
	#sbcc-banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		border-radius: 12px 12px 0 0;
		padding: 20px 18px 18px;
	}

	.sbcc-banner-actions {
		flex-direction: column-reverse;
	}

	.sbcc-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	#sbcc-banner {
		animation: none;
	}
}
