/**
 * IC Cookie Consent - stile banner. Colore principale via --icc-accent (iniettato
 * dal plugin). Nessun colore di sfondo scuro hardcoded: rispetta il tema.
 */
:root { --icc-accent: #2c7a3f; --icc-accent-dark: #21602f; }

.ccm-banner, .ccm-modal, .ccm-fab, .ccm-overlay {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ccm-overlay * { box-sizing: border-box; }

.ccm-banner {
	position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto;
	background: #fff; color: #2c2c2c; border-radius: 14px;
	box-shadow: 0 12px 48px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05);
	padding: 22px 24px; z-index: 2147483646;
	transform: translateY(120%); opacity: 0;
	transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
}
.ccm-banner.ccm-visible { transform: translateY(0); opacity: 1; }
.ccm-banner.ccm-center { left: 16px; right: 16px; top: 50%; bottom: auto; transform: translateY(-40%); }
.ccm-banner.ccm-center.ccm-visible { transform: translateY(-50%); }

.ccm-title { font-size: 17px; font-weight: 600; margin: 0 0 8px; line-height: 1.3; }
.ccm-highlight {
	font-size: 13px; line-height: 1.5; color: #2c2c2c;
	background: color-mix(in srgb, var(--icc-accent) 8%, transparent);
	border-left: 3px solid var(--icc-accent); padding: 10px 14px; border-radius: 6px; margin: 0 0 12px;
}
.ccm-body { font-size: 12.5px; line-height: 1.55; color: #6b6b6b; margin: 0 0 14px; }
.ccm-links { font-size: 12.5px; margin-bottom: 14px; }
.ccm-links a { color: var(--icc-accent); text-decoration: underline; margin-right: 14px; }
.ccm-links a:hover { color: var(--icc-accent-dark); }

.ccm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ccm-btn {
	flex: 1 1 auto; min-width: 120px; padding: 12px 18px; border-radius: 100px;
	font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s;
	border: 1.5px solid transparent; font-family: inherit; line-height: 1;
}
.ccm-btn-accept { background: var(--icc-accent); color: #fff; border-color: var(--icc-accent); }
.ccm-btn-accept:hover { filter: brightness(.92); }
.ccm-btn-reject { background: #fff; color: #2c2c2c; border-color: rgba(0,0,0,.18); }
.ccm-btn-reject:hover { background: #f5f5f5; border-color: rgba(0,0,0,.3); }
.ccm-btn-custom { background: transparent; color: var(--icc-accent); border-color: var(--icc-accent); }
.ccm-btn-custom:hover { background: color-mix(in srgb, var(--icc-accent) 8%, transparent); }

.ccm-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2147483645;
	display: none; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto;
}
.ccm-overlay.ccm-open { display: flex; }
.ccm-modal {
	background: #fff; color: #2c2c2c; border-radius: 16px; max-width: 640px; width: 100%;
	padding: 26px 28px; margin: auto; box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.ccm-modal h2 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.ccm-modal p.ccm-intro { font-size: 13.5px; line-height: 1.55; color: #6b6b6b; margin: 0 0 18px; }

.ccm-cat { border: 1px solid rgba(0,0,0,.1); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.ccm-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ccm-cat-name { font-size: 14.5px; font-weight: 600; margin: 0; flex: 1; }
.ccm-cat-desc { font-size: 12.5px; line-height: 1.5; color: #6b6b6b; margin-top: 8px; }
.ccm-cat-tag { font-size: 11px; color: #6b6b6b; padding: 2px 8px; background: rgba(0,0,0,.04); border-radius: 100px; flex-shrink: 0; }

.ccm-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ccm-toggle input { opacity: 0; width: 0; height: 0; }
.ccm-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: .2s; }
.ccm-slider::before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ccm-toggle input:checked + .ccm-slider { background: var(--icc-accent); }
.ccm-toggle input:checked + .ccm-slider::before { transform: translateX(18px); }
.ccm-toggle input:disabled + .ccm-slider { background: #b5d8b5; cursor: not-allowed; }

.ccm-det { margin-top: 10px; }
.ccm-det summary { font-size: 12px; color: var(--icc-accent); cursor: pointer; }
.ccm-det-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11.5px; }
.ccm-det-table th, .ccm-det-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid rgba(0,0,0,.08); vertical-align: top; }
.ccm-det-table th { color: #6b6b6b; font-weight: 600; }
.ccm-det-table code { font-size: 11px; }

.ccm-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(0,0,0,.08); }
.ccm-meta { font-size: 11px; color: #6b6b6b; margin-top: 12px; text-align: center; }

.ccm-fab {
	position: fixed; left: 16px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%;
	background: #fff; color: var(--icc-accent); border: 1.5px solid var(--icc-accent); cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.15); display: none; align-items: center; justify-content: center;
	z-index: 2147483644; transition: all .2s;
}
.ccm-fab.ccm-visible { display: flex; }
.ccm-fab:hover { transform: scale(1.08); background: var(--icc-accent); color: #fff; }
.ccm-fab svg { width: 22px; height: 22px; fill: currentColor; }

@media (max-width: 600px) {
	.ccm-banner { padding: 18px; left: 8px; right: 8px; bottom: 8px; border-radius: 12px; }
	.ccm-title { font-size: 15.5px; }
	.ccm-actions { flex-direction: column; }
	.ccm-btn { width: 100%; min-width: 0; }
	.ccm-modal { padding: 20px 18px; border-radius: 12px; }
	.ccm-fab { left: 8px; bottom: 8px; width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .ccm-banner { transition: none; } }
