/* ══════════════════════════════════════════════════════
   Cookie Consent Banner
   Palette: #222831 · #393E46 · #00ADB5 · #EEEEEE
   ══════════════════════════════════════════════════════ */

/* ── Overlay ── */
.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 40, 49, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.cookie-consent-overlay.cookie-consent--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Banner Container ── */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 16px 16px;
  transform: translateY(110%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.cookie-consent.cookie-consent--visible {
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent.cookie-consent--hidden {
  transform: translateY(110%);
  pointer-events: none;
}

/* ── Inner Card ── */
.cookie-consent__card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--ch-dark, #222831);
  border: 1px solid rgba(0, 173, 181, 0.15);
  border-radius: var(--radius-xl, 16px);
  box-shadow:
    0 -4px 30px rgba(0, 0, 0, 0.25),
    0 0 60px rgba(0, 173, 181, 0.08);
  overflow: hidden;
  position: relative;
}

/* Decorative teal glow line at top */
.cookie-consent__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      var(--ch-teal, #00ADB5) 30%,
      var(--ch-teal, #00ADB5) 70%,
      transparent);
  border-radius: 2px;
}

/* ── Body ── */
.cookie-consent__body {
  padding: 24px 24px 20px;
}

/* ── Header row ── */
.cookie-consent__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cookie-consent__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 173, 181, 0.15), rgba(0, 173, 181, 0.06));
  border: 1px solid rgba(0, 173, 181, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ch-teal, #00ADB5);
  animation: cookieIconFloat 3s ease-in-out infinite;
}

@keyframes cookieIconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.cookie-consent__title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ch-light, #EEEEEE);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── Description ── */
.cookie-consent__text {
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(238, 238, 238, 0.7);
  margin: 0 0 6px;
}

.cookie-consent__text a {
  color: var(--ch-teal, #00ADB5);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cookie-consent__text a:hover {
  color: #33C4CC;
  text-decoration: underline;
}

/* ── Cookie types badges ── */
.cookie-consent__types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.cookie-consent__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(238, 238, 238, 0.65);
  transition: all 0.2s ease;
}

.cookie-consent__type-badge i {
  font-size: 10px;
  color: var(--ch-teal, #00ADB5);
  opacity: 0.8;
}

.cookie-consent__type-badge--essential {
  background: rgba(0, 173, 181, 0.1);
  border-color: rgba(0, 173, 181, 0.2);
  color: rgba(0, 173, 181, 0.9);
}

.cookie-consent__type-badge--essential i {
  color: var(--ch-teal, #00ADB5);
  opacity: 1;
}

/* ── Actions ── */
.cookie-consent__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cookie-consent__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-lg, 12px);
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  outline: none;
  white-space: nowrap;
}

/* Primary: Accept All */
.cookie-consent__btn--accept {
  background: linear-gradient(135deg, var(--ch-teal, #00ADB5), #009DA5);
  color: #FFFFFF;
  box-shadow:
    0 2px 8px rgba(0, 173, 181, 0.3),
    0 0 0 0 rgba(0, 173, 181, 0);
}

.cookie-consent__btn--accept:hover {
  background: linear-gradient(135deg, #00BEC7, var(--ch-teal, #00ADB5));
  box-shadow:
    0 4px 16px rgba(0, 173, 181, 0.4),
    0 0 0 3px rgba(0, 173, 181, 0.1);
  transform: translateY(-1px);
}

.cookie-consent__btn--accept:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 173, 181, 0.3);
}

/* Secondary: Necessary Only */
.cookie-consent__btn--decline {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 238, 238, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-consent__btn--decline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ch-light, #EEEEEE);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.cookie-consent__btn--decline:active {
  transform: translateY(0);
}

/* ── Mobile bottom nav offset ── */
@media (max-width: 767px) {
  .cookie-consent {
    padding: 0 10px calc(var(--bottom-nav-height, 60px) + 10px);
  }

  .cookie-consent__card {
    border-radius: var(--radius-lg, 12px);
  }

  .cookie-consent__body {
    padding: 18px 16px 16px;
  }

  .cookie-consent__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
  }

  .cookie-consent__title {
    font-size: 15px;
  }

  .cookie-consent__text {
    font-size: 12.5px;
  }

  .cookie-consent__types {
    gap: 5px;
    margin-bottom: 14px;
  }

  .cookie-consent__type-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .cookie-consent__actions {
    flex-direction: column;
    gap: 8px;
  }

  .cookie-consent__btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* ── Dismiss animation ── */
.cookie-consent--dismissing .cookie-consent__card {
  animation: cookieDismiss 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes cookieDismiss {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
}

/* ── Entrance animation for card content ── */
.cookie-consent--visible .cookie-consent__header {
  animation: cookieFadeUp 0.5s ease 0.15s both;
}

.cookie-consent--visible .cookie-consent__text {
  animation: cookieFadeUp 0.5s ease 0.25s both;
}

.cookie-consent--visible .cookie-consent__types {
  animation: cookieFadeUp 0.5s ease 0.35s both;
}

.cookie-consent--visible .cookie-consent__actions {
  animation: cookieFadeUp 0.5s ease 0.45s both;
}

@keyframes cookieFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
