/* ═══════════════════════════════════════════════════════════════════
   XENA HEALTH — COOKIE CONSENT
   Matches site design system: Cormorant Garamond / Playfair Display
   Gold (#F1D666) / Black (#0A0A0A) / Cream (#FAF8F2)
═══════════════════════════════════════════════════════════════════ */

/* ── VARIABLES (mirrors global.css tokens) ──────────────────────── */
:root {
  --cc-gold:        #F1D666;
  --cc-gold-dark:   #8A6A00;
  --cc-black:       #0A0A0A;
  --cc-white:       #FFFFFF;
  --cc-cream:       #FAF8F2;
  --cc-text-muted:  #E0E0E0;
  --cc-gray-mid:    #4d4a48;
  --cc-fs: 'Cormorant Garamond', Georgia, serif;
  --cc-fd: 'Playfair Display', Georgia, serif;
  --cc-z-banner: 9000;
  --cc-z-overlay: 9100;
  --cc-z-modal:  9200;
}

/* ── BANNER ─────────────────────────────────────────────────────── */
#cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--cc-z-banner);
  background: var(--cc-black);
  border-top: 1px solid rgba(241, 214, 102, 0.25);
  padding: 28px 40px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.5);
}

#cc-banner.cc-visible {
  transform: translateY(0);
}

#cc-banner.cc-hiding {
  transform: translateY(100%);
}

.cc-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.cc-banner-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-banner-eyebrow {
  font-family: var(--cc-fs);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cc-gold);
}

.cc-banner-text {
  font-family: var(--cc-fs);
  font-size: 17px;
  font-weight: 500;
  color: var(--cc-text-muted);
  line-height: 1.7;
  max-width: 680px;
}

.cc-banner-text strong {
  color: var(--cc-white);
  font-weight: 600;
}

.cc-banner-text a {
  color: var(--cc-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(241, 214, 102, 0.4);
  transition: text-decoration-color 0.2s;
}

.cc-banner-text a:hover {
  text-decoration-color: var(--cc-gold);
}

.cc-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 200px;
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.cc-btn {
  font-family: var(--cc-fs);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  padding: 13px 24px;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
  text-align: center;
}

.cc-btn:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.cc-btn-accept {
  background: var(--cc-gold);
  color: var(--cc-black);
}

.cc-btn-reject {
  background: transparent;
  color: var(--cc-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cc-btn-reject:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--cc-white);
  opacity: 1;
}

.cc-btn-manage {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 8px 24px;
}

.cc-btn-manage:hover {
  color: var(--cc-gold);
  opacity: 1;
  transform: none;
}

/* ── MODAL OVERLAY ──────────────────────────────────────────────── */
#cc-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--cc-z-overlay);
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#cc-overlay.cc-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── PREFERENCES MODAL ──────────────────────────────────────────── */
#cc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: var(--cc-z-modal);
  transform: translate(-50%, -48%) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0 20px;
}

#cc-modal.cc-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

.cc-modal-inner {
  background: var(--cc-black);
  border: 0.5px solid rgba(241, 214, 102, 0.22);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}

.cc-modal-header {
  padding: 40px 44px 32px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  position: relative;
}

.cc-modal-eyebrow {
  font-family: var(--cc-fs);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cc-gold);
  margin-bottom: 10px;
}

.cc-modal-title {
  font-family: var(--cc-fd);
  font-size: 28px;
  font-weight: 500;
  color: var(--cc-white);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.cc-modal-subtitle {
  font-family: var(--cc-fs);
  font-size: 16px;
  font-weight: 500;
  color: var(--cc-text-muted);
  line-height: 1.75;
}

.cc-modal-close {
  position: absolute;
  top: 36px;
  right: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  font-size: 21px;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
  font-family: var(--cc-fs);
}

.cc-modal-close:hover {
  color: var(--cc-gold);
}

/* ── CATEGORY LIST ──────────────────────────────────────────────── */
.cc-categories {
  padding: 8px 0;
}

.cc-category {
  padding: 24px 44px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: background 0.2s;
}

.cc-category:hover {
  background: rgba(255, 255, 255, 0.02);
}

.cc-category-text {
  flex: 1;
}

.cc-category-name {
  font-family: var(--cc-fd);
  font-size: 19px;
  font-weight: 500;
  color: var(--cc-white);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-category-always {
  font-family: var(--cc-fs);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cc-gold);
  opacity: 0.7;
}

.cc-category-desc {
  font-family: var(--cc-fs);
  font-size: 14px;
  font-weight: 500;
  color: var(--cc-text-muted);
  line-height: 1.7;
}

/* ── TOGGLE SWITCH ──────────────────────────────────────────────── */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.cc-toggle input:checked + .cc-toggle-track {
  background: var(--cc-gold);
  border-color: var(--cc-gold);
}

.cc-toggle input:disabled + .cc-toggle-track {
  background: rgba(241, 214, 102, 0.35);
  border-color: rgba(241, 214, 102, 0.35);
  cursor: not-allowed;
}

.cc-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s;
}

.cc-toggle input:checked + .cc-toggle-track::after {
  transform: translateX(20px);
  background: var(--cc-black);
}

.cc-toggle input:disabled + .cc-toggle-track::after {
  background: rgba(10, 10, 10, 0.4);
  transform: translateX(20px);
}

/* ── MODAL FOOTER ───────────────────────────────────────────────── */
.cc-modal-footer {
  padding: 28px 44px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.07);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cc-modal-footer .cc-btn-accept {
  flex: 1;
}

.cc-modal-footer .cc-btn-reject {
  flex: 1;
}

/* ── FOOTER RE-OPEN LINK ────────────────────────────────────────── */
#cc-reopen {
  font-family: var(--cc-fs);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
}

#cc-reopen:hover {
  color: var(--cc-gold);
  text-decoration-color: rgba(241, 214, 102, 0.4);
}

/* ── CCPA DO NOT SELL LINK ──────────────────────────────────────── */
#cc-dns-link {
  font-family: var(--cc-fs);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
  cursor: pointer;
}

#cc-dns-link:hover {
  color: var(--cc-gold);
  text-decoration-color: rgba(241, 214, 102, 0.4);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #cc-banner {
    padding: 24px 20px;
  }

  .cc-banner-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cc-banner-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: unset;
  }

  .cc-btn-accept,
  .cc-btn-reject {
    flex: 1;
    min-width: 120px;
  }

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

  #cc-modal {
    max-width: 100%;
    padding: 0 12px;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(20px) scale(0.98);
    max-height: 85vh;
  }

  #cc-modal.cc-visible {
    transform: translateY(0) scale(1);
  }

  .cc-modal-header,
  .cc-category,
  .cc-modal-footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .cc-modal-title {
    font-size: 24px;
  }
}
