/* ---------- Cookie consent banner (fixed bottom bar) ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.97);
  color: #f6f8fc;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 0;
  font-size: 0.9rem;
  box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.3);
  animation: cookie-banner-slide 0.3s ease-out;
  backdrop-filter: blur(4px);
}

@keyframes cookie-banner-slide {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.cookie-banner-inner {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 320px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  font-size: 0.9rem;
}

.cookie-banner-text a {
  color: var(--cyan-400, #38c4dc);
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: #1eb7cd;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.cookie-banner-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--r-pill, 9999px);
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.cookie-banner-btn:active {
  transform: scale(0.97);
}

.cookie-banner-btn--accept {
  background: var(--cyan-700, #038ea0);
  color: #fff;
}

.cookie-banner-btn--accept:hover {
  background: var(--cyan-600, #06a5be);
}

.cookie-banner-btn--decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.cookie-banner-btn--decline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Leaving state — fades the banner out before DOM removal so the slide-in
   animation isn't abruptly cut on click. Opacity-only keeps the slide-in
   transform keyframes intact while still smoothly removing the element. */
.cookie-banner--leaving {
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

@media (max-width: 600px) {

  /* Tighten vertical padding and inner rhythm so the banner reads as a
     compact footer strip, but keep buttons large enough to comfortably
     tap (≈38px+, hitting WCAG 2.5.5 AAA's 44px baseline is impractical
     for transient consent — Apple HIG's ~44pt tap target is the more
     realistic bar; ~38px is the closest compromise without bloating the
     banner back to its pre-tightening ~130px height).

     Targets:
       - banner total height ~75-90px (was ~110-130px)
       - text wraps to 2 short lines max on ≥320px (iPhone SE width)
       - buttons each ~36-38px tall, ≥14px readable font
       - 8px gap between adjacent tap targets (Apple HIG ≥8px minimum
         between buttons to prevent mis-tap)
   */
  .cookie-banner {
    padding: 5px 0;
    font-size: 0.82rem;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0 14px;
  }

  .cookie-banner-text {
    flex: 0 1 auto;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .cookie-banner-actions {
    justify-content: stretch;
    width: 100%;
    gap: 8px;
  }

  .cookie-banner-btn {
    flex: 1;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* Respect users with motion sensitivity. */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    animation: none;
  }

  .cookie-banner-btn {
    transition: none;
  }
}
