/* ─────────────────────────────────────────────────────────────
   Cookie consent banner + preferences modal
   Uses inline color values (no CSS-var dependency) so it works
   regardless of the host page's theme.
   ───────────────────────────────────────────────────────────── */

#cci-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a2d1a;
  color: #ffffff;
  border-top: 3px solid #d4890a;
  padding: 1.25rem 1.5rem;
  z-index: 999999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  animation: cciSlideUp 0.28s ease-out;
}
@keyframes cciSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.cci-cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.cci-cb-text {
  flex: 1 1 480px;
  min-width: 260px;
}
.cci-cb-text strong {
  display: block;
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: #ffffff;
}
.cci-cb-text p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
.cci-cb-text a {
  color: #f5b968;
  text-decoration: underline;
  font-weight: 600;
}
.cci-cb-text a:hover { color: #ffd591; }
.cci-cb-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}
.cci-btn {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.15rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s, background 0.15s;
  white-space: nowrap;
}
.cci-btn:hover  { opacity: 0.9; }
.cci-btn:active { transform: translateY(1px); }
.cci-btn-primary {
  background: #d4890a;
  color: #1a2d1a;
}
.cci-btn-primary:hover { background: #e79c1e; }
.cci-btn-alt {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.cci-btn-alt:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 720px) {
  #cci-consent-banner { padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
  .cci-cb-actions { width: 100%; justify-content: stretch; }
  .cci-cb-actions .cci-btn { flex: 1 1 auto; text-align: center; padding: 0.75rem 0.8rem; font-size: 0.8rem; }
}

/* ─── Preferences modal ─── */
#cci-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  animation: cciFadeIn 0.2s ease-out;
}
@keyframes cciFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cci-cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 15, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cci-cm-panel {
  position: relative;
  max-width: 560px;
  margin: 5vh auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.cci-cm-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #5a7a5a;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.cci-cm-close:hover { color: #1a2d1a; }
#cci-cm-title {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a2d1a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem 0;
  padding-right: 2rem;
}
.cci-cm-lede {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #2d4a2d;
  margin: 0 0 1.25rem 0;
}
.cci-cm-row {
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.cci-cm-row:last-of-type { border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.cci-cm-row-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.cci-cm-row-head strong {
  font-size: 0.98rem;
  color: #1a2d1a;
}
.cci-cm-row p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #5a7a5a;
  margin: 0;
  padding-left: 2.65rem;
}
.cci-cm-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.cci-cm-actions .cci-btn-alt {
  color: #1a2d1a;
  border-color: rgba(0, 0, 0, 0.15);
}
.cci-cm-actions .cci-btn-alt:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.25);
}
.cci-cm-legal {
  font-size: 0.72rem;
  color: #5a7a5a;
  line-height: 1.45;
  margin: 1.25rem 0 0 0;
}
/* Toggle switch */
.cci-toggle {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.cci-toggle input { display: none; }
.cci-toggle-slider {
  display: block;
  width: 100%;
  height: 100%;
  background: #cccccc;
  border-radius: 22px;
  transition: background 0.18s;
  cursor: pointer;
  position: relative;
}
.cci-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.cci-toggle input:checked + .cci-toggle-slider { background: #d4890a; }
.cci-toggle input:checked + .cci-toggle-slider::after { transform: translateX(18px); }
.cci-toggle input:disabled + .cci-toggle-slider { background: #6b8b6b; cursor: not-allowed; }
.cci-toggle input:disabled + .cci-toggle-slider::after { background: #f0f0f0; }
@media (max-width: 480px) {
  .cci-cm-panel { margin: 3vh 1rem; padding: 1.5rem; }
  .cci-cm-actions .cci-btn { flex: 1 1 auto; padding: 0.65rem 0.7rem; font-size: 0.78rem; }
}
