/*!
 * Yuma Cookie Consent v1.0.0 - stile di default
 * Personalizzabile sovrascrivendo le variabili CSS qui sotto (in un foglio di stile
 * caricato DOPO questo, oppure direttamente qui). Vedi README.md.
 */

:root {
	--ycc-color-bg: #ffffff;
	--ycc-color-text: #1f2328;
	--ycc-color-text-muted: #5b6270;
	--ycc-color-border: #e2e4e8;
	--ycc-color-primary: #2c3e50;
	--ycc-color-primary-text: #ffffff;
	--ycc-color-outline-border: #c7cad1;
	--ycc-radius: 10px;
	--ycc-shadow: 0 -2px 24px rgba(0, 0, 0, 0.12);
	--ycc-shadow-modal: 0 8px 40px rgba(0, 0, 0, 0.25);
	--ycc-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ycc-zindex: 999999;
}

.ycc-root {
	position: fixed;
	left: 0;
	right: 0;
	z-index: var(--ycc-zindex);
	font-family: var(--ycc-font);
	font-size: 15px;
	line-height: 1.5;
	color: var(--ycc-color-text);
	box-sizing: border-box;
}
.ycc-root * {
	box-sizing: border-box;
}

/* ---------- Banner principale ---------- */
.ycc-position-bottom {
	bottom: 0;
}
.ycc-position-top {
	top: 0;
}

.ycc-banner {
	background: var(--ycc-color-bg);
	border-top: 1px solid var(--ycc-color-border);
	box-shadow: var(--ycc-shadow);
	padding: 20px;
}
.ycc-position-top .ycc-banner {
	border-top: none;
	border-bottom: 1px solid var(--ycc-color-border);
}

.ycc-banner-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	justify-content: space-between;
}

.ycc-banner-text {
	flex: 1 1 420px;
	min-width: 260px;
}

.ycc-title {
	margin: 0 0 6px;
	font-weight: 700;
	font-size: 17px;
}

.ycc-description {
	margin: 0;
	color: var(--ycc-color-text-muted);
}

.ycc-links {
	margin-top: 8px;
	font-size: 13px;
}
.ycc-links a {
	color: var(--ycc-color-primary);
	text-decoration: underline;
}

.ycc-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
}

/* ---------- Bottoni ---------- */
.ycc-btn {
	appearance: none;
	border-radius: var(--ycc-radius);
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	white-space: nowrap;
	font-family: inherit;
}
.ycc-btn-primary {
	background: var(--ycc-color-primary);
	color: var(--ycc-color-primary-text);
}
.ycc-btn-primary:hover {
	filter: brightness(1.1);
}
.ycc-btn-outline {
	background: transparent;
	color: var(--ycc-color-text);
	border-color: var(--ycc-color-outline-border);
}
.ycc-btn-outline:hover {
	background: rgba(0, 0, 0, 0.04);
}

/* ---------- Overlay pannello preferenze ---------- */
.ycc-overlay {
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ycc-preferences {
	background: var(--ycc-color-bg);
	border-radius: var(--ycc-radius);
	box-shadow: var(--ycc-shadow-modal);
	max-width: 560px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
}

.ycc-preferences-inner {
	padding: 24px;
}

.ycc-categories {
	margin: 16px 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ycc-category {
	border: 1px solid var(--ycc-color-border);
	border-radius: var(--ycc-radius);
	padding: 14px 16px;
}

.ycc-category-header {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ycc-category-name {
	font-weight: 600;
	flex: 1;
}

.ycc-always-active {
	font-size: 12px;
	color: var(--ycc-color-text-muted);
}

.ycc-category-description {
	margin: 8px 0 0;
	font-size: 13.5px;
	color: var(--ycc-color-text-muted);
}

.ycc-preferences-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 8px;
}

/* ---------- Interruttore on/off ---------- */
.ycc-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex: 0 0 auto;
}
.ycc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.ycc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #c7cad1;
	border-radius: 22px;
	transition: 0.15s;
}
.ycc-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	top: 3px;
	background-color: white;
	border-radius: 50%;
	transition: 0.15s;
}
.ycc-switch input:checked + .ycc-slider {
	background-color: var(--ycc-color-primary);
}
.ycc-switch input:checked + .ycc-slider::before {
	transform: translateX(18px);
}
.ycc-switch input:disabled + .ycc-slider {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Impedisce lo scroll della pagina sottostante quando il pannello preferenze è aperto */
html.ycc-lock-scroll {
	overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.ycc-banner-inner {
		flex-direction: column;
		align-items: stretch;
	}
	.ycc-banner-actions {
		flex-direction: column;
	}
	.ycc-banner-actions .ycc-btn {
		width: 100%;
	}
}

/* ---------- Tema scuro (facoltativo, seguendo prefers-color-scheme) ---------- */
@media (prefers-color-scheme: dark) {
	.ycc-root {
		--ycc-color-bg: #1e2126;
		--ycc-color-text: #f1f2f4;
		--ycc-color-text-muted: #b3b8c2;
		--ycc-color-border: #33373f;
		--ycc-color-outline-border: #4a4f58;
	}
}
