/* Cookie Banner Pro - stili */

:root {
	--cbp-primary: #2271b1;
	--cbp-text: #1e1e1e;
	--cbp-bg: #ffffff;
	--cbp-radius: 10px;
}

.cbp-banner, .cbp-modal, .cbp-floating-btn {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	z-index: 999999;
}
.cbp-banner *, .cbp-modal *, .cbp-floating-btn * {
	box-sizing: border-box;
}

/* ---------- Banner ---------- */

.cbp-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--cbp-bg);
	color: var(--cbp-text);
	box-shadow: 0 -2px 24px rgba(0,0,0,.15);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .3s ease, transform .3s ease;
	padding: 20px;
}
.cbp-banner.cbp-visible {
	opacity: 1;
	transform: translateY(0);
}

.cbp-banner.cbp-pos-top {
	bottom: auto;
	top: 0;
	box-shadow: 0 2px 24px rgba(0,0,0,.15);
	transform: translateY(-20px);
}
.cbp-banner.cbp-pos-top.cbp-visible {
	transform: translateY(0);
}

.cbp-banner.cbp-layout-box {
	left: 20px;
	right: auto;
	bottom: 20px;
	max-width: 400px;
	border-radius: var(--cbp-radius);
	box-shadow: 0 4px 32px rgba(0,0,0,.2);
}
.cbp-banner.cbp-layout-box.cbp-pos-bottom-right {
	left: auto;
	right: 20px;
}
.cbp-banner.cbp-layout-box.cbp-pos-bottom-left {
	left: 20px;
	right: auto;
}

.cbp-banner-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
}
.cbp-layout-box .cbp-banner-inner {
	flex-direction: column;
	align-items: stretch;
}

.cbp-banner-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 6px;
	color: inherit;
}
.cbp-banner-message {
	margin: 0;
	flex: 1;
	min-width: 240px;
	color: inherit;
	opacity: .9;
}
.cbp-banner-message a {
	color: var(--cbp-primary);
	text-decoration: underline;
}

.cbp-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

/* ---------- Bottoni ---------- */

.cbp-btn {
	appearance: none;
	border: 2px solid var(--cbp-primary);
	background: var(--cbp-primary);
	color: #fff;
	padding: 10px 18px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
	white-space: nowrap;
}
.cbp-btn:hover {
	filter: brightness(0.92);
}
.cbp-btn:active {
	transform: scale(0.98);
}
.cbp-btn-outline {
	background: transparent;
	color: var(--cbp-primary);
}

/* ---------- Tema scuro ---------- */

.cbp-theme-dark.cbp-banner,
.cbp-theme-dark .cbp-modal-box {
	background: #1e1e1e;
	color: #f1f1f1;
}
.cbp-theme-dark .cbp-banner-message,
.cbp-theme-dark .cbp-category-desc {
	color: #cfcfcf;
}
.cbp-theme-dark .cbp-btn-outline {
	color: #fff;
	border-color: #666;
}

/* ---------- Modal preferenze ---------- */

.cbp-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.cbp-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.5);
	opacity: 0;
	transition: opacity .3s ease;
}
.cbp-modal.cbp-visible .cbp-modal-overlay {
	opacity: 1;
}
.cbp-modal-box {
	position: relative;
	background: var(--cbp-bg);
	color: var(--cbp-text);
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 12px;
	padding: 28px;
	opacity: 0;
	transform: scale(.96);
	transition: opacity .3s ease, transform .3s ease;
}
.cbp-modal.cbp-visible .cbp-modal-box {
	opacity: 1;
	transform: scale(1);
}
.cbp-modal-box h2 {
	margin-top: 0;
}

.cbp-categories {
	margin: 20px 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.cbp-category {
	border: 1px solid rgba(127,127,127,.25);
	border-radius: 8px;
	padding: 12px 14px;
}
.cbp-category-header {
	display: flex;
	align-items: center;
	gap: 10px;
}
.cbp-category-desc {
	margin: 8px 0 0;
	font-size: 13px;
	opacity: .85;
}
.cbp-badge-locked {
	margin-left: auto;
	font-size: 11px;
	text-transform: uppercase;
	background: rgba(127,127,127,.2);
	padding: 3px 8px;
	border-radius: 20px;
}

.cbp-modal-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin-top: 10px;
}

/* Switch on/off */
.cbp-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}
.cbp-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.cbp-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #ccc;
	border-radius: 22px;
	transition: .2s;
}
.cbp-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: .2s;
}
.cbp-switch input:checked + .cbp-slider {
	background: var(--cbp-primary);
}
.cbp-switch input:checked + .cbp-slider::before {
	transform: translateX(18px);
}
.cbp-switch input:disabled + .cbp-slider {
	opacity: .6;
	cursor: not-allowed;
}

/* ---------- Pulsante fluttuante ---------- */

.cbp-floating-btn {
	position: fixed;
	bottom: 20px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--cbp-primary);
	color: #fff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.cbp-floating-left, .cbp-floating-bottom-left {
	left: 20px;
}
.cbp-floating-right, .cbp-floating-bottom-right {
	right: 20px;
}

/* Link riapertura preferenze via shortcode */
.cbp-reopen-link {
	background: none;
	border: none;
	color: var(--cbp-primary);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	padding: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
	.cbp-banner.cbp-layout-box {
		left: 10px;
		right: 10px;
		bottom: 10px;
		max-width: none;
	}
	.cbp-banner-actions {
		width: 100%;
	}
	.cbp-btn {
		flex: 1;
	}
	.cbp-modal-box {
		padding: 20px;
	}
}

/* ---------- Admin ---------- */

.cbp-admin-wrap .cbp-tab-content {
	background: #fff;
	padding: 20px;
	border: 1px solid #c3c4c7;
	border-top: none;
}
