/* Banner y panel de cookies (includes/cookies-banner.php) — 2026-09-18.
   Hoja propia para que funcione también en las páginas autocontenidas
   que no cargan styles.css.
   Colores de marca: navy #00123a · accent #0062fd. */

.ck-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  background: #ffffff;
  color: #00123a;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 10, 40, 0.28);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  animation: ck-subir 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ck-banner[hidden], .ck-panel-fondo[hidden] { display: none !important; }

@keyframes ck-subir {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.ck-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.ck-copy { flex: 1 1 420px; min-width: 0; }
.ck-titulo { font-size: 1rem; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.ck-texto { font-size: 0.88rem; color: #3f4a5c; margin: 0; }
.ck-texto a, .ck-pie a { color: #0062fd; font-weight: 600; text-decoration: underline; }

.ck-acciones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

/* Aceptar y Rechazar comparten EXACTAMENTE el mismo estilo (AEPD: mismo
   peso visual). Solo "Configurar"/"Guardar" es secundario. */
.ck-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ck-btn:active { transform: scale(0.97); }
.ck-btn:focus-visible { outline: 3px solid rgba(0, 98, 253, 0.35); outline-offset: 2px; }
.ck-btn-principal { background: #00123a; color: #fff; }
.ck-btn-principal:hover { background: #142352; }
.ck-btn-secundario { background: #fff; color: #00123a; border-color: #cfd6e2; }
.ck-btn-secundario:hover { background: #f3f5f9; }

/* ---------- panel de configuración ---------- */
.ck-panel-fondo {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0, 13, 41, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #00123a;
  line-height: 1.55;
}
.ck-panel {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px 24px 18px;
  box-shadow: 0 30px 80px rgba(0, 10, 40, 0.4);
}
.ck-panel-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ck-panel-cabecera .ck-titulo { font-size: 1.15rem; margin: 0; }
.ck-cerrar {
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: #64748b; padding: 4px 8px; border-radius: 8px;
}
.ck-cerrar:hover { background: #f3f5f9; color: #00123a; }

.ck-cat { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.ck-cat p { font-size: 0.84rem; color: #64748b; margin: 8px 0 0; }
.ck-cat-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-cat-cab strong { display: block; font-size: 0.95rem; }
.ck-cat-sub { font-size: 0.78rem; color: #64748b; }

/* interruptor accesible: el input real queda visible para lectores de pantalla */
.ck-switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; cursor: pointer; }
.ck-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ck-switch span {
  position: absolute; inset: 0; border-radius: 26px; background: #cfd6e2; transition: background 0.15s ease;
}
.ck-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.15s ease;
}
.ck-switch input:checked + span { background: #0062fd; }
.ck-switch input:checked + span::after { transform: translateX(18px); }
.ck-switch input:focus-visible + span { outline: 3px solid rgba(0, 98, 253, 0.35); outline-offset: 2px; }
.ck-switch-fija { cursor: not-allowed; opacity: 0.75; }
.ck-switch-fija input { cursor: not-allowed; }
.ck-switch-fija input:checked + span { background: #16a34a; }

.ck-panel-acciones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 16px; }
.ck-pie { font-size: 0.78rem; color: #64748b; margin: 12px 0 0; }

@media (max-width: 640px) {
  .ck-banner { left: 8px; right: 8px; bottom: 8px; }
  .ck-inner { padding: 16px; gap: 12px; }
  .ck-acciones { width: 100%; }
  .ck-acciones .ck-btn { flex: 1 1 auto; }
  .ck-panel { padding: 18px 16px 14px; }
  .ck-panel-acciones .ck-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-banner { animation: none; }
}
