
/* ==========================================================================
   16. COOKIE MODALS – full original + polished
   ========================================================================== */
/* ==========================================================================
   COOKIE CONSENT MODALS – Minimal, Sleek, Modern Dark 2026
   Compact layout • Glassmorphism • Micro-interactions • High polish
   ========================================================================== */

/* ── Modal Container ─────────────────────────────────────────────────────── */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop – stronger blur + slight vignette */
.cookie-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

/* ── Modal Window ────────────────────────────────────────────────────────── */
.cookie-window {
  position: relative;
  background: rgba(12, 17, 25, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid #1e293b;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(76, 123, 245, 0.12) inset;
  width: min(92%, 540px);
  padding: 2.2rem 2rem;
  color: #e9edf5;
  transition: transform 0.42s cubic-bezier(0.34, 1.16, 0.64, 1);
  transform: scale(0.94);
}

.cookie-modal:not(.hidden) .cookie-window {
  transform: scale(1);
}

/* Slightly larger manage variant */
.cookie-window.manage {
  padding: 2.1rem 2.2rem 2.4rem;
  max-width: 580px;
}

/* Header (Manage only) */
.cookie-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
}

.cookie-header h2 {
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafd;
}

.close-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  transition: all 0.22s ease;
}

.close-btn:hover,
.close-btn:focus-visible {
  color: #e9edf5;
  background: rgba(255,255,255,0.08);
}

/* ── Text Content ────────────────────────────────────────────────────────── */
.cookie-window p {
  font-size: 0.96rem;
  line-height: 1.58;
  color: #a3b4d0;
  margin-bottom: 1.8rem;
}

.learn-more {
  color: #4c7bf5;
  text-decoration: none;
  font-weight: 550;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.28s ease;
}

.learn-more:hover {
  color: #6b90ff;
  transform: translateX(3px);
}

/* ── Cookie Sections (Manage modal) ─────────────────────────────────────── */
.cookie-section {
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem;
  background: rgba(15, 22, 34, 0.4);
  border-radius: 14px;
  border: 1px solid #1e293b;
}

.cookie-section:first-of-type {
  background: transparent;
  border: none;
  padding: 0 0 1.2rem;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 550;
  color: #e9edf5;
}

.always-active {
  color: #4c7bf5;
  font-size: 0.84rem;
  font-weight: 600;
  background: rgba(76, 123, 245, 0.14);
  padding: 0.28em 0.8em;
  border-radius: 999px;
}

.hint {
  margin-top: 0.7rem;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.5;
}

/* ── Custom Toggle Switch ────────────────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle span {
  position: absolute;
  inset: 0;
  background: #334155;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.toggle span::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle input:checked + span {
  background: #4c7bf5;
}

.toggle input:checked + span::before {
  transform: translateX(20px);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
  justify-content: flex-end;
}

.cookie-btn {
  min-width: 138px;
  padding: 0.82rem 1.4rem;
  font-size: 0.84rem;
  font-weight: 580;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid #3b6ae8;
  background: transparent;
  color: #6b90ff;
}

.cookie-btn:hover {
  background: #3b6ae8;
  color: white;
  transform: translateY(-1px);
}

.cookie-btn.filled,
.cookie-btn#saveManage {
  background: #4c7bf5;
  color: white;
  border-color: #4c7bf5;
}

.cookie-btn.filled:hover,
.cookie-btn#saveManage:hover {
  background: #3b6ae8;
}

.cookie-btn.outline {
  border-color: #475569;
  color: #a3b4d0;
}

.cookie-btn.outline:hover {
  background: #1e293b;
  color: #e9edf5;
  border-color: #334155;
}

/* ── Mobile adjustments ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cookie-window {
    padding: 1.8rem 1.5rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .cookie-btn {
    min-width: auto;
    width: 100%;
  }
}