/* Cargo Credible cookie banner + preferences modal.
   Brand: navy backgrounds, orange CTAs, no rounded corners. */

.cc-banner[hidden],
.cc-modal[hidden] { display: none !important; }

.cc-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9990;
  background: #0F1D2F;
  color: #ffffff;
  border-top: 3px solid #E84A1D;
  font-family: 'Space Grotesk', sans-serif;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}
.cc-banner__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.cc-banner__copy {
  flex: 1 1 380px;
  font-size: 14px;
  line-height: 1.5;
}
.cc-banner__copy a {
  color: #FBC4B2;
  text-decoration: underline;
  margin-left: 8px;
}
.cc-banner__copy strong {
  font-weight: 600;
  margin-right: 6px;
}
.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons - equally prominent per CNIL guidance */
.cc-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  border-radius: 0 !important;
  text-transform: none;
  letter-spacing: 0.02em;
  min-width: 120px;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.cc-btn--primary {
  background: #E84A1D;
  color: #ffffff;
  border-color: #E84A1D;
}
.cc-btn--primary:hover { background: #C13A12; border-color: #C13A12; }
.cc-btn--ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}
.cc-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #ffffff; }

/* Modal */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 29, 47, 0.72);
}
.cc-modal__panel {
  position: relative;
  background: #ffffff;
  color: #0F1D2F;
  width: min(560px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  font-family: 'Space Grotesk', sans-serif;
  border-top: 4px solid #E84A1D;
}
.cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #E5E7EB;
}
.cc-modal__header h2 {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.cc-modal__close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #1E3A5F;
  padding: 0 4px;
}
.cc-modal__body {
  padding: 18px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.55;
}
.cc-modal__body > p:first-child { margin-top: 0; color: #475569; }
.cc-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid #E5E7EB;
  background: #F8FAFC;
}
.cc-modal__footer .cc-btn--ghost {
  color: #1E3A5F;
  border-color: #1E3A5F;
}
.cc-modal__footer .cc-btn--ghost:hover { background: #EEF2F6; }

/* Category rows */
.cc-cat {
  padding: 14px 0;
  border-bottom: 1px solid #F1F5F9;
}
.cc-cat:last-child { border-bottom: 0; }
.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cc-cat__name {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.cc-cat__pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1E3A5F;
  background: #FEECE7;
  padding: 4px 10px;
}
.cc-cat__desc {
  margin: 0;
  font-size: 13px;
  color: #475569;
}
.cc-cat__desc code {
  background: #F1F5F9;
  padding: 1px 5px;
  font-size: 12px;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cc-toggle__slider {
  position: absolute;
  inset: 0;
  background: #CBD5E1;
  cursor: pointer;
  transition: background 120ms ease;
}
.cc-toggle__slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  transition: transform 140ms ease;
}
.cc-toggle input:checked + .cc-toggle__slider { background: #E84A1D; }
.cc-toggle input:checked + .cc-toggle__slider::before { transform: translateX(20px); }
.cc-toggle input:focus-visible + .cc-toggle__slider { outline: 2px solid #1E3A5F; outline-offset: 2px; }

/* Body scroll lock when modal open */
body.cc-modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .cc-banner__inner { padding: 14px 16px; }
  .cc-banner__actions { width: 100%; }
  .cc-btn { flex: 1 1 0; min-width: 0; }
}
