/* ==========================================================================
   Cookie Consent Popup
   ========================================================================== */

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: cookieFadeIn 0.3s ease;
}

.cookie-consent--active {
  display: flex;
}

@keyframes cookieFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-consent__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(4px);
}

.cookie-consent__popup {
  position: relative;
  max-width: 560px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 20px 60px rgba(10, 22, 40, 0.3);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(201, 166, 104, 0.15);
}

/* Gold top accent */
.cookie-consent__popup::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #C9A668 0%, #e8c87a 50%, #C9A668 100%);
  border-radius: 12px 12px 0 0;
}

/* ============================================
   Header
   ============================================ */

.cookie-consent__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cookie-consent__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: rgba(201, 166, 104, 0.1);
  border-radius: 50%;
  color: #C9A668;
}

.cookie-consent__icon svg {
  width: 20px;
  height: 20px;
}

.cookie-consent__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0A1628;
  margin: 0;
}

/* ============================================
   Body
   ============================================ */

.cookie-consent__body {
  margin-bottom: 1.5rem;
}

.cookie-consent__text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #8896a8;
  margin-bottom: 1.25rem;
}

.cookie-consent__link {
  color: #C9A668;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cookie-consent__link:hover {
  color: #0A1628;
  text-decoration: underline;
}

/* ============================================
   Options / Toggles
   ============================================ */

.cookie-consent__options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-consent__option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #f5f3ef;
  border-radius: 6px;
  border: 1px solid rgba(10, 22, 40, 0.04);
}

.cookie-consent__option-text {
  flex: 1;
  min-width: 0;
}

.cookie-consent__option-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #0A1628;
  display: block;
}

.cookie-consent__option-desc {
  font-size: 0.7rem;
  color: #8896a8;
}

/* Toggle Switch */
.cookie-consent__toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

.cookie-consent__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-consent__toggle input:disabled + .cookie-consent__toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-consent__toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: background 0.3s ease;
  cursor: pointer;
}

.cookie-consent__toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-consent__toggle input:checked + .cookie-consent__toggle-slider {
  background: #C9A668;
}

.cookie-consent__toggle input:checked + .cookie-consent__toggle-slider::before {
  transform: translateX(20px);
}

/* ============================================
   Footer / Buttons
   ============================================ */

.cookie-consent__footer {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.cookie-consent__btn {
  flex: 1;
  min-width: 120px;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cookie-consent__btn--accept {
  background: #0A1628;
  color: #fff;
}

.cookie-consent__btn--accept:hover {
  background: #1a2a3e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.15);
}

.cookie-consent__btn--accept svg {
  width: 16px;
  height: 16px;
}

.cookie-consent__btn--reject {
  background: transparent;
  color: #8896a8;
  border: 1px solid rgba(10, 22, 40, 0.08);
}

.cookie-consent__btn--reject:hover {
  background: #f5f3ef;
  color: #0A1628;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 720px) {
  .cookie-consent__popup {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .cookie-consent__option {
    padding: 0.5rem 0.6rem;
  }

  .cookie-consent__option-label {
    font-size: 0.75rem;
  }

  .cookie-consent__option-desc {
    font-size: 0.65rem;
  }

  .cookie-consent__toggle {
    width: 38px;
    height: 20px;
  }

  .cookie-consent__toggle-slider::before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
  }

  .cookie-consent__toggle input:checked + .cookie-consent__toggle-slider::before {
    transform: translateX(18px);
  }

  .cookie-consent__footer {
    flex-direction: column-reverse;
  }

  .cookie-consent__btn {
    flex: none;
    width: 100%;
  }
}

/* ============================================
   Dark Mode
   ============================================ */

@media (prefers-color-scheme: dark) {
  .cookie-consent__popup {
    background: #1a2a3e;
  }

  .cookie-consent__title {
    color: #fff;
  }

  .cookie-consent__text {
    color: rgba(255, 255, 255, 0.6);
  }

  .cookie-consent__link:hover {
    color: #fff;
  }

  .cookie-consent__option {
    background: #0A1628;
    border-color: rgba(255, 255, 255, 0.04);
  }

  .cookie-consent__option-label {
    color: #fff;
  }

  .cookie-consent__option-desc {
    color: rgba(255, 255, 255, 0.5);
  }

  .cookie-consent__btn--accept {
    background: #C9A668;
  }

  .cookie-consent__btn--accept:hover {
    background: #b8974a;
    box-shadow: 0 8px 24px rgba(201, 166, 104, 0.3);
  }

  .cookie-consent__btn--reject {
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
  }

  .cookie-consent__btn--reject:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
  }

  .cookie-consent__toggle input:checked + .cookie-consent__toggle-slider {
    background: #C9A668;
  }

  .cookie-consent__overlay {
    background: rgba(0, 0, 0, 0.8);
  }
}