/* ══════════════════════════════════════════════════════════════════
   COOKIE CONSENT — Estilos del banner de consentimiento
   ══════════════════════════════════════════════════════════════════
   MOBILE-FIRST: Base = móvil, breakpoints hacia arriba.
   PALETA: Variables de variables.css (--color-primary = rojo SME).
   Z-INDEX: 10000 para estar sobre nav, modales y chatbots externos.
   ACCESIBILIDAD: foco visible, contraste mínimo AA (WCAG 2.1).
   ══════════════════════════════════════════════════════════════════ */

/* ── CONTENEDOR PRINCIPAL ────────────────────────────────────────── */
.sl-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background-color: #1a1a1a;
  color: #f0f0f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.40);

  /* ── Entrada / salida con transición suave ── */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;

  /* Fuente: heredada del sitio (Montserrat) */
  font-family: inherit;
  font-size: 0.875rem; /* 14px base */
  line-height: 1.5;
}

/* Estado visible — activado por JS con requestAnimationFrame */
.sl-cookie-banner--visible {
  transform: translateY(0);
  opacity: 1;
}

/* Estado ocultándose — activado por JS al aceptar/rechazar */
.sl-cookie-banner--hiding {
  transform: translateY(100%);
  opacity: 0;
}

/* ── INNER: Disposición interna ──────────────────────────────────── */
.sl-cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── TEXTO ───────────────────────────────────────────────────────── */
.sl-cookie-banner__text p {
  margin: 0;
  color: #d4d4d4;
  font-size: 0.8125rem; /* 13px — legible en móvil sin ocupar espacio */
}

.sl-cookie-banner__text strong {
  color: #ffffff;
  font-weight: 600;
}

/* Link hacia política de cookies */
.sl-cookie-banner__link {
  color: #e8a0a4;    /* rojo claro — visible sobre fondo oscuro */
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.sl-cookie-banner__link:hover,
.sl-cookie-banner__link:focus {
  color: #ffffff;
  outline: none;
}

/* ── ACCIONES ────────────────────────────────────────────────────── */
.sl-cookie-banner__actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

/* ── BOTONES: base compartida ────────────────────────────────────── */
.sl-cookie-btn {
  flex: 1 1 120px;       /* crecer pero no más angosto que 120px */
  min-width: 110px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  text-align: center;
  white-space: nowrap;
}

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

/* Foco accesible visible (teclado / lectores de pantalla) */
.sl-cookie-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ── BOTÓN PRIMARIO: Aceptar ─────────────────────────────────────── */
.sl-cookie-btn--primary {
  background-color: #dd0a14;  /* --color-primary del sitio */
  color: #ffffff;
}

.sl-cookie-btn--primary:hover {
  background-color: #b5080f;
}

/* ── BOTÓN SECUNDARIO: Rechazar ──────────────────────────────────── */
.sl-cookie-btn--secondary {
  background-color: transparent;
  color: #c0c0c0;
  border: 1px solid #555555;
}

.sl-cookie-btn--secondary:hover {
  background-color: #2e2e2e;
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE: Tablet y Desktop
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  .sl-cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
  }

  .sl-cookie-banner__text {
    flex: 1;
  }

  .sl-cookie-banner__text p {
    font-size: 0.875rem; /* 14px en tablet+ */
  }

  .sl-cookie-banner__actions {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .sl-cookie-btn {
    flex: 0 0 auto;
    padding: 0.5rem 1.25rem;
  }
}

@media (min-width: 1024px) {
  .sl-cookie-banner__inner {
    padding: 0.875rem 2rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   SAFE AREA: Dispositivos con notch (iPhone con home indicator)
   ══════════════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sl-cookie-banner {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ══════════════════════════════════════════════════════════════════
   REDUCIR MOVIMIENTO: respeta preferencia del sistema operativo
   ══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .sl-cookie-banner,
  .sl-cookie-banner--visible,
  .sl-cookie-banner--hiding {
    transition: none;
    transform: none;
    opacity: 1;
  }

  .sl-cookie-banner--hiding {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════════
   FIN cookie-consent.css
   ══════════════════════════════════════════════════════════════════ */
