/* Agenzia23 Cookie Consent - Frontend styles */

#a23cc-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	background: #1f2a24;
	color: var(--a23cc-text-color, #ffffff);
	box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transform: translateY(20px);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

#a23cc-banner.a23cc-visible {
	opacity: 1;
	transform: translateY(0);
}

#a23cc-banner.a23cc-pos-bottom { bottom: 0; }
#a23cc-banner.a23cc-pos-top { top: 0; transform: translateY(-20px); }
#a23cc-banner.a23cc-pos-top.a23cc-visible { transform: translateY(0); }

#a23cc-banner.a23cc-layout-box {
	left: auto;
	right: 20px;
	bottom: 20px;
	max-width: 380px;
	border-radius: 12px;
}

.a23cc-banner-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 28px;
	max-width: 1200px;
	margin: 0 auto;
}

.a23cc-banner-text { flex: 1 1 320px; }
.a23cc-banner-text h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.a23cc-banner-text p { margin: 0; font-size: 13.5px; line-height: 1.5; opacity: 0.92; }
.a23cc-banner-text a { color: inherit; text-decoration: underline; }

.a23cc-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.a23cc-btn {
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.1s ease;
	white-space: nowrap;
}
.a23cc-btn:hover { opacity: 0.88; }
.a23cc-btn:active { transform: scale(0.97); }

.a23cc-btn-reject,
.a23cc-btn-customize {
	background: transparent;
	color: inherit;
	border: 1px solid rgba(255,255,255,0.35);
}

.a23cc-btn-accept,
.a23cc-btn-save {
	background: var(--a23cc-primary-color, #2e7d32);
	color: #fff;
}

.a23cc-preferences-panel {
	display: none;
	padding: 0 28px 24px;
	max-width: 1200px;
	margin: 0 auto;
	border-top: 1px solid rgba(255,255,255,0.12);
	margin-top: 10px;
	padding-top: 20px;
}

#a23cc-banner.a23cc-show-preferences .a23cc-preferences-panel { display: block; }

.a23cc-preferences-panel h3 { margin: 0 0 14px; font-size: 15px; }

.a23cc-category-row { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.a23cc-category-row:last-child { border-bottom: none; }

.a23cc-category-header {
	display: flex;
	align-items: center;
	gap: 10px;
}

.a23cc-category-desc {
	margin: 6px 0 0 54px;
	font-size: 12.5px;
	opacity: 0.8;
	line-height: 1.4;
}

.a23cc-always-active {
	font-size: 11px;
	opacity: 0.6;
	font-weight: 400;
}

.a23cc-preferences-actions {
	margin-top: 16px;
	text-align: right;
}

/* Toggle switch */
.a23cc-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}
.a23cc-switch input { opacity: 0; width: 0; height: 0; }
.a23cc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: rgba(255,255,255,0.25);
	border-radius: 22px;
	transition: 0.2s;
}
.a23cc-slider::before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: 0.2s;
}
.a23cc-switch input:checked + .a23cc-slider {
	background-color: var(--a23cc-primary-color, #2e7d32);
}
.a23cc-switch input:checked + .a23cc-slider::before {
	transform: translateX(18px);
}
.a23cc-switch input:disabled + .a23cc-slider {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Floating icon */
.a23cc-floating-icon {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--a23cc-primary-color, #2e7d32);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 12px rgba(0,0,0,0.25);
	transition: transform 0.2s ease;
}
.a23cc-floating-icon:hover { transform: scale(1.08); }

/* Cookie table (shortcode) */
.a23cc-cookie-table-wrap { margin: 20px 0; }
.a23cc-cookie-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}
.a23cc-cookie-table th,
.a23cc-cookie-table td {
	border: 1px solid #ddd;
	padding: 8px 12px;
	text-align: left;
	font-size: 14px;
}
.a23cc-cookie-table th { background: #f5f5f5; }

@media (max-width: 640px) {
	.a23cc-banner-inner { flex-direction: column; align-items: stretch; }
	.a23cc-banner-actions { justify-content: stretch; }
	.a23cc-btn { flex: 1; }
	.a23cc-category-desc { margin-left: 0; }
}
