/* Banner cookies — embudo + páginas legales (RGPD / Meta Pixel) */

:root {
  --cookie-gold: #ffd700;
  --cookie-muted: #6b7280;
  --cookie-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cookie-safe-left: env(safe-area-inset-left, 0px);
  --cookie-safe-right: env(safe-area-inset-right, 0px);
  --cookie-safe-bottom: env(safe-area-inset-bottom, 0px);
  --funnel-gold: var(--cookie-gold);
  --funnel-muted: var(--cookie-muted);
  --funnel-font: var(--cookie-font);
  --funnel-safe-left: var(--cookie-safe-left);
  --funnel-safe-right: var(--cookie-safe-right);
  --funnel-safe-bottom: var(--cookie-safe-bottom);
  --funnel-banner-h: 108px;
  --funnel-banner-collapsed-h: 62px;
}

body.cookie-consent-open {
  overflow: hidden;
}

#cookie-banner-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

#cookie-banner-backdrop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12000;
  background: rgba(8, 8, 8, 0.98);
  border-top: 2px solid rgba(255, 215, 0, 0.45);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.65);
  padding: 18px max(16px, var(--cookie-safe-left)) calc(18px + var(--cookie-safe-bottom)) max(16px, var(--cookie-safe-right));
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: none;
}

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

.funnel-cookie-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 18px;
}

.funnel-cookie-text {
  flex: 1 1 280px;
  min-width: 0;
}

.funnel-cookie-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cookie-gold);
  margin-bottom: 8px;
}

.funnel-cookie-text p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.funnel-cookie-text a {
  color: var(--cookie-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.funnel-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.funnel-cookie-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--cookie-font);
  white-space: nowrap;
}

.funnel-cookie-btn--gold {
  background: var(--cookie-gold);
  color: #000;
}

.funnel-cookie-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.funnel-cookie-btn--outline {
  background: transparent;
  color: var(--cookie-gold);
  border: 1px solid rgba(255, 215, 0, 0.55);
}

#cookie-banner.funnel-cookie-expanded {
  padding-bottom: calc(20px + var(--cookie-safe-bottom));
}

.funnel-cookie-panel {
  max-width: 960px;
  margin: 14px auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.funnel-cookie-panel-hint {
  margin: 0 0 12px;
  font-size: 0.76rem;
  color: var(--cookie-muted);
}

.funnel-cookie-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #fff;
  cursor: pointer;
}

.funnel-cookie-check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.funnel-cookie-check.is-locked {
  opacity: 0.85;
  cursor: default;
}

/* Enlace mínimo en pie (sin botón flotante) — RGPD: poder cambiar consentimiento */
.funnel-cookie-legal-min {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 6px max(12px, var(--cookie-safe-left)) calc(6px + var(--cookie-safe-bottom)) max(12px, var(--cookie-safe-right));
  text-align: center;
  pointer-events: none;
}

.funnel-cookie-legal-min a {
  pointer-events: auto;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--cookie-font);
}

.funnel-cookie-legal-min a:hover {
  color: var(--cookie-gold);
}

body.funnel-page.has-countdown-bar .funnel-cookie-legal-min {
  bottom: calc(var(--funnel-banner-h) + var(--cookie-safe-bottom));
}

body.funnel-page.has-countdown-bar.is-bar-collapsed .funnel-cookie-legal-min {
  bottom: calc(var(--funnel-banner-collapsed-h) + var(--cookie-safe-bottom));
}

@media (max-width: 640px) {
  .funnel-cookie-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .funnel-cookie-btn {
    width: 100%;
    text-align: center;
  }
}
