/* ========== Aviso de cookies (15/11/2026) ==========
   El aviso lo pone Tag Manager (GTM-M936RDJ, etiqueta «Banner de cookies»: guarda la elección en lcConsentV2 y avisa a Google
   con el modo de consentimiento). Aquí solo se viste con la marca de Wandae, sin tocar cómo funciona ([ÉL] 15/11: «el estilo de
   las cookies… arréglalas»). Los textos y los botones los cambia js/cookies.js. Los selectores van con «html body» delante
   para ganar a los estilos que mete Tag Manager, que llegan después.
   - Tarjeta blanca abajo a la izquierda (la burbuja del chat va a la derecha); en móvil, abajo y a lo ancho, sin tapar la
     pantalla.
   - Sin la capa oscura que bloqueaba la web hasta elegir: solo sale con el panel de «Configurar».
   - Sin el botón flotante «Cookies»: para cambiar la elección, «Configurar cookies» en el pie de cada página.
   - Botones: el .boton de la web; «Rechazar» y «Aceptar», iguales (la AEPD pide que rechazar sea tan fácil como aceptar). */

html body #lc-consent {
  left: 24px; right: auto; bottom: 24px; transform: none;
  width: min(460px, calc(100% - 48px)); max-width: none; padding: 24px;
  background: var(--superficie); color: var(--tinta); border: 1px solid rgb(17 18 22 / .08); border-radius: var(--radio);
  box-shadow: 0 24px 60px rgb(17 18 22 / .18); font: 400 16px/1.5 "Figtree", system-ui, sans-serif;
  transition: opacity .3s ease, visibility 0s;
}
/* 15/11: el aviso no se ve hasta que js/cookies.js le ha puesto sus textos y han cargado sus letras, y entra solo con
   opacidad. Antes aparecía con los textos y las letras de Tag Manager, cambiaba de alto y, como va pegado abajo, su borde de
   arriba se movía: PageSpeed lo contaba como desplazamiento (0,10 en móvil). Si el guion no llega, sale igual a los 3 s. */
html body #lc-consent:not(.wd-ck-listo) { visibility: hidden; opacity: 0; animation: wd-ck-muestra 0s 3s forwards; }
@keyframes wd-ck-muestra { to { visibility: visible; opacity: 1; } }
html body #lc-consent .inner { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
html body #lc-consent .wd-ck-titulo { grid-column: 1 / -1; margin: 0; font: 700 20px/1.2 "Sora", system-ui, sans-serif; letter-spacing: -.01em; }
html body #lc-consent p { grid-column: 1 / -1; margin: 0; color: rgb(17 18 22 / .78); }
html body #lc-consent p a, html body #lc-panel a { color: var(--klein); text-decoration: underline; text-underline-offset: 3px; }
/* Los botones: el .boton de la web en Klein, los dos iguales. Con el id delante, para ganar a los colores de Tag Manager
   (#lc-accept, #lc-reject…, que van por id). */
html body #lc-consent .boton, html body #lc-panel .boton {
  width: 100%; height: 48px; padding: 0 20px; border: 2px solid var(--klein); border-radius: 100px;
  background: var(--klein); color: var(--blanco); font: 600 16px/1 "Figtree", system-ui, sans-serif;
}
@media (hover: hover) {
  html body #lc-consent .boton:hover, html body #lc-panel .boton:hover { border-radius: 14px; color: var(--tinta); }
}

/* «Política de cookies» y «Configurar», en una fila de enlaces encima de los botones */
html body #lc-consent .wd-ck-enlaces { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin-bottom: 4px; }
html body #lc-consent .wd-ck-enlaces a { color: var(--klein); text-decoration: underline; text-underline-offset: 4px; }
html body #lc-consent #lc-config, html body #lc-panel #lc-close {
  min-height: 48px; padding: 0; border: 0; border-radius: 0; background: none; cursor: pointer;
  font: 600 16px/1 "Figtree", system-ui, sans-serif; color: var(--klein); text-decoration: underline; text-underline-offset: 4px;
}

html body #lc-open { display: none !important; }

/* La capa oscura, solo con el panel abierto */
html body #lc-overlay { display: none !important; background: rgb(17 18 22 / .5); backdrop-filter: none; -webkit-backdrop-filter: none; }
html.wd-ck-panel body #lc-overlay { display: block !important; }
html.wd-ck-panel body #lc-consent { z-index: 999997; } /* con el panel abierto, el aviso queda debajo de la capa */

/* ---------- Panel de «Configurar cookies» ---------- */
html body #lc-panel {
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; padding: 32px;
  background: var(--superficie); color: var(--tinta); border-radius: var(--radio); box-shadow: 0 24px 60px rgb(17 18 22 / .25);
  font: 400 16px/1.5 "Figtree", system-ui, sans-serif;
}
html body #lc-panel h3 { margin: 0 0 8px; font: 700 24px/1.2 "Sora", system-ui, sans-serif; letter-spacing: -.01em; }
html body #lc-panel .wd-ck-entrada { margin: 0 0 16px; color: rgb(17 18 22 / .78); }
html body #lc-panel .row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid rgb(17 18 22 / .1); }
html body #lc-panel .row strong { display: block; margin-bottom: 4px; font: 600 18px/1.3 "Figtree", system-ui, sans-serif; }
html body #lc-panel .row > div { color: rgb(17 18 22 / .78); }
html body #lc-panel .row > div strong { color: var(--tinta); }
html body #lc-panel .wd-ck-siempre { flex: none; font-weight: 600; color: var(--klein); white-space: nowrap; }

/* Interruptor: la casilla de Tag Manager, con forma de interruptor; el texto «Activar» queda para lectores de pantalla */
html body #lc-panel label { flex: none; display: inline-flex; align-items: center; min-width: 56px; min-height: 48px; cursor: pointer; font-size: 0; }
html body #lc-panel input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 52px; height: 30px; margin: 0; border-radius: 30px;
  background: var(--gris); cursor: pointer; transition: background .25s ease;
}
html body #lc-panel input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--superficie);
  box-shadow: 0 1px 3px rgb(17 18 22 / .3); transition: transform .25s ease;
}
html body #lc-panel input[type="checkbox"]:checked { background: var(--klein); }
html body #lc-panel input[type="checkbox"]:checked::after { transform: translateX(22px); }
html body #lc-panel input[type="checkbox"]:focus-visible { outline: 2px solid var(--klein); outline-offset: 3px; }

html body #lc-panel .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
html body #lc-panel .actions .boton { width: 100%; padding: 0 20px; }
html body #lc-panel #lc-close { grid-column: 1 / -1; order: 3; justify-self: start; }
html body #lc-panel #lc-save { order: 1; }
html body #lc-panel #lc-accept2 { order: 2; }

/* «Configurar cookies» en la fila legal del pie */
.pie-legal .wd-ck-pie { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; opacity: .6; transition: opacity .35s; }
@media (hover: hover) { .pie-legal .wd-ck-pie:hover { opacity: 1; } }
@media (pointer: coarse) { .pie-legal .wd-ck-pie { min-height: 48px; } }

@media (max-width: 640px) {
  html body #lc-consent { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 20px 16px 16px; }
  html body #lc-consent .inner { gap: 8px 12px; }
  html body #lc-consent .wd-ck-titulo { font-size: 18px; }
  html body #lc-panel { padding: 24px 20px; }
  html body #lc-panel .actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html body #lc-panel input[type="checkbox"], html body #lc-panel input[type="checkbox"]::after { transition: none; }
}
