:root {
  --kcc-font   : 'All Round Gothic', sans-serif;
  --kcc-blue   : #24538e;
  --kcc-ocra   : #f5b349;
  --kcc-orange : #cf5648;
  --kcc-cream  : #f0ebdd;
  --kcc-dark   : #1a1a1a;
}

/* ═══════════════════════════════════════════
   BANNER
   ═══════════════════════════════════════════ */
.kcc-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  background: var(--kcc-dark);
  color: var(--kcc-cream);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
  font-family: var(--kcc-font);
  animation: kccSlideUp 0.4s ease;
}
.kcc-banner[hidden] { display: none !important; }
@keyframes kccSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kcc-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.kcc-banner-text {
  flex: 1 1 420px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(240,235,221,0.88);
  margin: 0;
}
.kcc-banner-text a { color: var(--kcc-ocra); text-decoration: underline; }
.kcc-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.kcc-btn {
  font-family: var(--kcc-font);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.kcc-btn-fill {
  background: var(--kcc-ocra);
  color: var(--kcc-dark);
}
.kcc-btn-fill:hover { opacity: 0.88; }
.kcc-btn-outline {
  background: transparent;
  color: var(--kcc-cream);
  border-color: rgba(240,235,221,0.35);
}
.kcc-btn-outline:hover { border-color: var(--kcc-cream); }
.kcc-btn-ghost {
  background: transparent;
  color: rgba(240,235,221,0.75);
  text-decoration: underline;
  padding: 12px 8px;
}
.kcc-btn-ghost:hover { color: var(--kcc-cream); }

/* ═══════════════════════════════════════════
   MODALE PREFERENZE
   ═══════════════════════════════════════════ */
.kcc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(26,26,26,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.kcc-modal-overlay[hidden] { display: none !important; }
.kcc-modal {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--kcc-cream);
  border-radius: 18px;
  font-family: var(--kcc-font);
  color: var(--kcc-dark);
  animation: kccPopIn 0.25s ease;
}
@keyframes kccPopIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.kcc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 12px;
}
.kcc-modal-head h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--kcc-blue);
  margin: 0;
}
.kcc-modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: rgba(26,26,26,0.5);
  cursor: pointer;
  padding: 4px 8px;
}
.kcc-modal-close:hover { color: var(--kcc-orange); }
.kcc-modal-body { padding: 4px 24px 8px; display: flex; flex-direction: column; gap: 18px; }

.kcc-cat {
  border-top: 1px solid rgba(36,83,142,0.12);
  padding-top: 16px;
}
.kcc-cat:first-child { border-top: none; padding-top: 0; }
.kcc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.kcc-cat-title { font-size: 15px; font-weight: 700; }
.kcc-cat-desc { font-size: 13.5px; line-height: 1.6; color: rgba(26,26,26,0.7); margin: 0; }

.kcc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.kcc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kcc-switch-track {
  position: absolute; inset: 0;
  background: rgba(36,83,142,0.2);
  border-radius: 999px;
  transition: background 0.2s;
}
.kcc-switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.kcc-switch input:checked + .kcc-switch-track { background: var(--kcc-blue); }
.kcc-switch input:checked + .kcc-switch-track .kcc-switch-thumb { transform: translateX(18px); }
.kcc-switch-locked .kcc-switch-track { background: var(--kcc-blue); opacity: 0.55; }
.kcc-switch-locked input { cursor: not-allowed; }

.kcc-modal-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 24px 24px;
}
.kcc-modal-foot .kcc-btn { flex: 1 1 auto; text-align: center; }
.kcc-modal-foot .kcc-btn-outline { color: var(--kcc-blue); border-color: rgba(36,83,142,0.3); }
.kcc-modal-foot .kcc-btn-outline:hover { border-color: var(--kcc-blue); }

@media (max-width: 640px) {
  .kcc-banner { left: 10px; right: 10px; bottom: 10px; border-radius: 14px; }
  .kcc-banner-inner { padding: 20px; }
  .kcc-banner-actions { width: 100%; }
  .kcc-banner-actions .kcc-btn { flex: 1 1 auto; text-align: center; }
}
