/* =====================================================================
   COOKIES — banner de consentimiento
   Nada de analítica carga hasta que el usuario acepta.
   Usa los tokens de marca (tokens.css).
   ===================================================================== */

.cookie-banner {
  position: fixed; z-index: 200;
  left: clamp(.75rem, 2vw, 1.5rem);
  right: clamp(.75rem, 2vw, 1.5rem);
  bottom: clamp(.75rem, 2vw, 1.5rem);
  max-width: 720px; margin-inline: auto;
  background: var(--white, #fff);
  color: var(--ink, #2A2823);
  border: 1px solid var(--line, #E7DCC6);
  border-radius: var(--radius-lg, 24px);
  box-shadow: 0 32px 64px -28px rgba(80,60,10,.45);
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  display: none;
  opacity: 0; transform: translateY(16px);
  transition: opacity .45s cubic-bezier(.22,1,.36,1), transform .45s cubic-bezier(.22,1,.36,1);
}
.cookie-banner.is-visible { display: block; }
.cookie-banner.is-in { opacity: 1; transform: none; }

.cookie-banner__title {
  font-family: var(--font-display, system-ui); font-weight: 700;
  font-size: 1.05rem; margin-bottom: .4rem;
  display: flex; align-items: center; gap: .5rem;
}
.cookie-banner__title::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--teal-deep, #3F9686); flex: none;
}
.cookie-banner__text {
  font-size: .95rem; line-height: 1.55;
  color: var(--ink-soft, #5C564B); max-width: 60ch;
}
.cookie-banner__text a { color: var(--gold-deep, #8A7220); font-weight: 600; text-decoration: underline; }
.cookie-banner__text a:hover { color: var(--gold, #B8992B); }

.cookie-banner__actions {
  margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .6rem;
}
.cookie-btn {
  font-family: var(--font-display, system-ui); font-weight: 600; font-size: .95rem;
  padding: .78em 1.4em; border-radius: 999px; cursor: pointer; border: none;
  transition: transform .3s cubic-bezier(.22,1,.36,1), background .3s, box-shadow .3s;
}
.cookie-btn:hover { transform: translateY(-2px); }
.cookie-btn--accept {
  background: var(--gold, #B8992B); color: #fff;
  box-shadow: 0 6px 18px -10px rgba(80,60,10,.5);
}
.cookie-btn--accept:hover { background: var(--gold-deep, #8A7220); }
.cookie-btn--reject {
  background: transparent; color: var(--ink, #2A2823);
  box-shadow: inset 0 0 0 1.5px var(--line, #E7DCC6);
}
.cookie-btn--reject:hover { box-shadow: inset 0 0 0 1.5px var(--gold, #B8992B); }
.cookie-btn:focus-visible { outline: 3px solid var(--teal-deep, #3F9686); outline-offset: 3px; }

/* Enlace "Preferencias de cookies" en el footer */
.cookie-prefs-link { cursor: pointer; }

@media (max-width: 560px) {
  /* Compacto en móvil: el banner no debe comerse el hero.
     Botones en fila (son dos palabras cortas) y texto más ajustado. */
  .cookie-banner { padding: 1rem 1.05rem; border-radius: var(--radius, 20px); }
  .cookie-banner__title { font-size: .98rem; margin-bottom: .3rem; }
  .cookie-banner__text { font-size: .88rem; line-height: 1.45; }
  .cookie-banner__actions { margin-top: .85rem; gap: .5rem; }
  .cookie-btn { flex: 1 1 0; padding: .72em 1em; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; transform: none; }
}

/* Solo en pantallas estrechas el banner ocupa todo el ancho y taparía los
   botones flotantes; ahí los subimos. En desktop el banner va centrado y los
   flotantes quedan en los bordes, así que no se tocan y no hay que moverlos.
   La altura real la publica cookies.js en --cookie-banner-h. */
@media (max-width: 760px) {
  body.has-cookie-banner .wa-float {
    bottom: calc(clamp(1rem, 2vw, 1.6rem) + var(--cookie-banner-h, 200px) + .75rem);
    transition: bottom .45s cubic-bezier(.22,1,.36,1);
  }
  body.has-cookie-banner chat-widget {
    transform: translateY(calc(-1 * (var(--cookie-banner-h, 200px) + .75rem)));
    transition: transform .45s cubic-bezier(.22,1,.36,1);
  }
}
