/* ==========================================================================
   COOKIE CONSENT BANNER & PREFERENCES MODAL
   ========================================================================== */

/* ─── BANNER ─────────────────────────────────────────────────────────────── */
.cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Below the mobile nav overlay (999) and drawer (1001) so an open menu
     covers the banner instead of the banner covering the menu's CTAs */
  z-index: 998;
  padding: 16px 24px 24px;
}

.cc-banner__inner {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: 0 12px 40px rgba(1, 0, 10, 0.16);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.cc-banner__title {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.cc-banner__desc {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted-dark);
}

.cc-banner__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cc-link {
  color: var(--grad-blue);
  text-decoration: underline;
  font-weight: 600;
}

.cc-btn {
  height: 44px;
  padding: 12px 20px;
  font-size: 14px;
  border: none;
}

.cc-btn--ghost {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-dark);
}

.cc-btn--ghost:hover {
  border-color: var(--grad-green);
}

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.cc-modal-overlay[hidden] {
  display: none;
}

.cc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(1, 0, 10, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cc-modal {
  background: var(--white);
  border-radius: var(--card-radius);
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
}

.cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cc-modal__title {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.cc-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: 8px;
}

.cc-modal__close:hover {
  background: var(--bg-light-gray);
}

.cc-modal__desc {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted-dark);
  margin-bottom: 24px;
}

/* ─── CATEGORY ROWS ──────────────────────────────────────────────────────── */
.cc-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--bg-light-gray);
}

.cc-category__name {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.cc-category__desc {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted-dark);
}

/* ─── TOGGLE SWITCH ──────────────────────────────────────────────────────── */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: inherit;
}

.cc-toggle__track {
  pointer-events: none;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s;
}

.cc-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s;
}

.cc-toggle input:checked + .cc-toggle__track {
  background: linear-gradient(90deg, var(--grad-green), var(--grad-blue));
}

.cc-toggle input:checked + .cc-toggle__track::after {
  transform: translateX(20px);
}

.cc-toggle input:focus-visible + .cc-toggle__track {
  outline: 2px solid var(--grad-blue);
  outline-offset: 2px;
}

.cc-toggle--locked {
  cursor: not-allowed;
  opacity: 0.6;
}

.cc-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ─── MOBILE ─────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .cc-banner {
    padding: 12px 16px 16px;
  }

  .cc-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px;
  }

  .cc-banner__actions {
    justify-content: stretch;
    flex-direction: column-reverse;
  }

  .cc-banner__actions .cc-btn {
    width: 100%;
  }

  .cc-modal {
    padding: 24px 20px;
  }

  .cc-modal__actions {
    flex-direction: column-reverse;
  }

  .cc-modal__actions .cc-btn {
    width: 100%;
  }
}
