/* Software Digital (tienda) · fase 3 · lo que flota: aviso de cookies compacto y WhatsApp de 48 px.
   Se carga después de sd-tienda.css. Solo aspecto: Complianz sigue con su configuración (mismo banner, botones y consentimiento).
   1 aviso de cookies · 2 barra de compra con el aviso abierto · 3 WhatsApp · 4 menos movimiento */

/* 1 ─ Aviso de cookies: barra compacta abajo. Aceptar, Denegar y Ver preferencias con el mismo peso (mismo estilo y alto).
       En el móvil, a lo ancho con 8 px de margen: texto corto arriba y los tres botones en una fila (≈ 110 px de alto).
       Desde 768 px, una tarjeta estrecha abajo a la izquierda: no tapa el centro ni el botón de WhatsApp. */
html body .cmplz-cookiebanner.cmplz-show {
  left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  width: auto !important; max-width: none !important; margin: 0 !important; transform: none !important;
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-gap: 8px !important; gap: 8px !important;
  padding: 10px 10px 10px 16px !important; border: 0 !important; border-radius: 20px !important;
  background: rgba(255, 255, 255, .97) !important; -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 0 0 1px rgba(14, 17, 22, .08), var(--sombra-alta) !important;
  max-height: calc(100dvh - 16px) !important; overflow-y: auto !important;
  font-family: var(--fuente); color: var(--tinta); -webkit-font-smoothing: antialiased;
}
html body .cmplz-cookiebanner.cmplz-show:hover { box-shadow: 0 0 0 1px rgba(14, 17, 22, .08), var(--sombra-alta) !important; }
html body .cmplz-cookiebanner.cmplz-show > * { grid-column: 1 / -1 !important; grid-row: auto !important; min-width: 0 !important; }
html body .cmplz-cookiebanner .cmplz-header,
html body .cmplz-cookiebanner .cmplz-divider,
html body .cmplz-cookiebanner .cmplz-links.cmplz-documents,
html body .cmplz-cookiebanner .cmplz-links.cmplz-information { display: none !important; }
html body .cmplz-cookiebanner .cmplz-body > div { width: auto !important; }
html body .cmplz-cookiebanner .cmplz-body { display: block !important; margin: 0 !important; min-width: 0 !important; max-height: none !important; overflow: visible !important; }
html body .cmplz-cookiebanner .cmplz-message {
  margin: 0 !important; font-family: var(--fuente) !important; font-size: 15px !important; line-height: 1.4 !important; color: var(--tinta) !important; font-weight: 450;
  text-wrap: pretty;
}
html body .cmplz-cookiebanner .cmplz-message a { color: var(--accion) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
html body .cmplz-cookiebanner .cmplz-buttons { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 6px !important; margin: 0 !important; }
html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
  flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; height: auto !important; min-height: 44px !important; margin: 0 !important; padding: 0 12px !important;
  border: 0 !important; border-radius: 999px !important; background: var(--blanco) !important; color: var(--tinta) !important;
  box-shadow: inset 0 0 0 1px #C9CCD4 !important; font-family: var(--fuente) !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.2 !important;
  white-space: nowrap !important; cursor: pointer; transition: background-color .15s, box-shadow .15s;
}
html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn:hover { background: var(--velo) !important; box-shadow: inset 0 0 0 1px var(--borde) !important; }
html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn:focus-visible { outline: 3px solid var(--accion) !important; outline-offset: 2px; }
/* Los que Complianz no enseña en esta vista siguen ocultos (Guardar preferencias solo con las categorías abiertas; el de TCF nunca). */
html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-save-preferences,
html body .cmplz-cookiebanner .cmplz-buttons a.cmplz-btn.tcf,
html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-manage-options { display: none !important; }
/* «Ver preferencias» abierto: categorías a lo ancho, botones en dos filas si no caben. */
html body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-buttons { flex-wrap: wrap !important; }
html body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-buttons .cmplz-btn.cmplz-save-preferences { display: inline-flex !important; align-items: center; justify-content: center; }
html body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-buttons .cmplz-btn.cmplz-view-preferences { display: none !important; }
html body .cmplz-cookiebanner .cmplz-categories { width: auto !important; margin-top: 10px !important; }
html body .cmplz-cookiebanner .cmplz-categories .cmplz-category { border-radius: 14px; background: var(--fondo) !important; }
html body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header { grid-template-columns: 1fr auto 15px !important; }
html body .cmplz-cookiebanner .cmplz-categories .cmplz-category-title { font-family: var(--fuente); font-size: 15px !important; font-weight: 600 !important; color: var(--tinta) !important; }
html body .cmplz-cookiebanner .cmplz-categories .cmplz-description { font-size: 14px !important; line-height: 1.45; color: var(--gris) !important; }
@media (max-width: 359.98px) {
  html body .cmplz-cookiebanner.cmplz-show { padding: 10px 8px 10px 12px !important; }
  html body .cmplz-cookiebanner .cmplz-buttons { gap: 4px !important; }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn { padding: 0 8px !important; font-size: 14px !important; }
}
@media (min-width: 768px) {
  html body .cmplz-cookiebanner.cmplz-show {
    left: 20px !important; right: auto !important; bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(100% - 40px, 600px) !important; padding: 16px 16px 16px 22px !important; border-radius: 24px !important; gap: 12px !important;
    max-height: calc(100dvh - 40px) !important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons { justify-content: flex-end; }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn { flex: 0 1 auto !important; padding: 0 18px !important; }
}

/* 2 ─ Mientras el aviso está abierto no sale la barra de compra de la ficha (vuelve al aceptar, denegar o guardar). */
html.sd-cookies-visible .sd-barra { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

/* 3 ─ WhatsApp: 48 px y apartado. En el móvil, más pegado a la esquina; se esconde mientras haces scroll (vuelve al parar)
       y mientras está la barra de compra (la ficha ya tiene «¿Dudas? Escríbenos por WhatsApp»). El pie deja hueco debajo. */
.sd-wa { width: 48px; height: 48px; transition: bottom .3s cubic-bezier(.2, .8, .2, 1), transform .2s, opacity .2s, visibility 0s; }
.sd-wa .icono { width: 26px; height: 26px; }
@media (max-width: 767.98px) {
  .sd-wa { right: 12px; bottom: calc(12px + var(--alto-cookies) + var(--alto-barra) + env(safe-area-inset-bottom, 0px)); }
  html.sd-desplazando .sd-wa,
  html.sd-barra-visible .sd-wa { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
  .sd-pie .sd-pie__base::after { content: ""; display: block; height: 64px; }
}
/* Desde 768 px el aviso es una tarjeta de 600 px a la izquierda: el botón no tiene que subir por encima de él. */
@media (min-width: 768px) {
  .sd-wa { right: 20px; bottom: calc(20px + var(--alto-barra) + env(safe-area-inset-bottom, 0px)); }
}

/* 4 ─ Menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .sd-wa, html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn { transition: none !important; }
}
