/* ================================================================
   COOKIE CONSENT BANNER — dark glassmorphic theme
   ================================================================ */

/* ── Overlay ── */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.consent-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Banner wrapper ── */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.consent-banner.visible {
  transform: translateY(0);
}

/* ── Glass card ── */
.consent-card {
  max-width: 680px;
  margin: 0 auto 1.25rem;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 1rem;
  background: rgba(10, 15, 30, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.12);
  box-shadow:
    0 -4px 40px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(56, 189, 248, 0.04);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

/* ── Shield icon ── */
.consent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--primary-blue));
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}

/* ── Header row ── */
.consent-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.consent-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ── Body text ── */
.consent-body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.15rem;
}
.consent-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.consent-body a:hover {
  color: var(--cyan-light);
}

/* ── Toggle section ── */
.consent-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.consent-toggle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.consent-toggle-item:hover {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.06);
}
.consent-toggle-item.locked {
  opacity: 0.55;
  cursor: default;
}

/* ── Custom toggle switch ── */
.consent-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.consent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.consent-switch .slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.25s ease;
  cursor: pointer;
}
.consent-switch .slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.consent-switch input:checked + .slider {
  background: linear-gradient(135deg, var(--cyan), var(--primary-blue));
}
.consent-switch input:checked + .slider::after {
  transform: translateX(16px);
}
.consent-switch input:disabled + .slider {
  cursor: default;
}

/* ── Buttons row ── */
.consent-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.consent-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 0.55rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, opacity 0.2s ease;
  text-align: center;
}
.consent-btn:active {
  transform: scale(0.97);
}

/* Accept all */
.consent-btn-accept {
  background: linear-gradient(135deg, var(--cyan), var(--primary-blue));
  color: #fff;
  box-shadow: 0 2px 16px rgba(56, 189, 248, 0.3);
}
.consent-btn-accept:hover {
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.45);
}

/* Reject all */
.consent-btn-reject {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.consent-btn-reject:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Save preferences */
.consent-btn-save {
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.consent-btn-save:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
}

/* ── Floating re-open button ── */
.consent-reopen {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9990;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 15, 30, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  pointer-events: none;
}
.consent-reopen.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.consent-reopen:hover {
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  border-color: rgba(56, 189, 248, 0.35);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .consent-card {
    margin: 0 0.5rem 0.75rem;
    padding: 1.25rem 1.15rem 1.15rem;
    border-radius: 0.85rem;
  }
  .consent-title {
    font-size: 1rem;
  }
  .consent-body {
    font-size: 0.82rem;
  }
  .consent-actions {
    flex-direction: column;
  }
  .consent-btn {
    min-width: unset;
  }
  .consent-toggles {
    gap: 0.45rem;
  }
}
