/* Banner y panel de cookies — usa las variables de color de la web */
.ck{ display:none; font-family:'Inter', sans-serif; }
.ck.ck-open{ display:block; }

.ck-banner{
  position:fixed;
  left:16px; right:16px; bottom:16px;
  z-index:100;
  max-width: 980px;
  margin: 0 auto;
  background: var(--surface, #111d35);
  border: 1px solid var(--line-strong, rgba(245,240,230,0.18));
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  padding: 22px 24px;
  display:flex;
  align-items:center;
  gap: 24px;
  color: var(--text, #f5f0e6);
}
.ck-modal-open .ck-banner{ display:none; }
.ck-text p{ margin:0; font-size: 13.5px; line-height:1.55; color: var(--muted, #a9b0c0); }
.ck-text a{ color: var(--blue, #d4af5a); }
.ck-title{
  font-family:'Playfair Display', Georgia, serif;
  font-size: 17px !important;
  font-weight: 600;
  color: var(--text, #f5f0e6) !important;
  margin: 0 0 6px !important;
}

.ck-actions{ display:flex; gap:10px; flex-shrink:0; flex-wrap:wrap; }
.ck-btn{
  font-family:'IBM Plex Mono', monospace;
  font-size: 12.5px;
  padding: 11px 18px;
  border-radius: 9px;
  cursor:pointer;
  white-space:nowrap;
  transition: border-color .2s, background .2s, filter .2s;
}
/* Aceptar y Rechazar con el mismo peso visual (criterio AEPD) */
.ck-ghost{ background: transparent; color: var(--text, #f5f0e6); border:1px solid var(--line-strong, rgba(245,240,230,0.18)); }
.ck-ghost:hover{ border-color: var(--blue, #d4af5a); background: var(--blue-dim, rgba(212,175,90,0.17)); }
.ck-solid{ background: var(--blue, #d4af5a); color: var(--bg, #0b1426); border:1px solid var(--blue, #d4af5a); font-weight:500; }
.ck-solid:hover{ filter: brightness(1.08); }
.ck-btn:focus-visible, .ck-switch:focus-visible{ outline: 2px solid var(--green, #8fb0e8); outline-offset: 3px; }

.ck-modal{
  display:none;
  position:fixed; inset:0;
  z-index:101;
  background: rgba(5,10,20,0.7);
  backdrop-filter: blur(4px);
  align-items:center;
  justify-content:center;
  padding: 16px;
}
.ck-modal-open .ck-modal{ display:flex; }
.ck-panel{
  background: var(--surface, #111d35);
  border: 1px solid var(--line-strong, rgba(245,240,230,0.18));
  border-radius: 16px;
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow:auto;
  color: var(--text, #f5f0e6);
}
.ck-panel .ck-title{ font-size: 21px !important; margin-bottom: 14px !important; }
.ck-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line, rgba(245,240,230,0.10));
  cursor: default;
}
label.ck-row{ cursor:pointer; }
.ck-row b{ display:block; font-size: 14.5px; font-weight:600; margin-bottom: 3px; }
.ck-row span{ display:block; font-size: 13px; color: var(--muted, #a9b0c0); line-height:1.5; }
.ck-always{
  flex-shrink:0;
  font-family:'IBM Plex Mono', monospace;
  font-size: 11px !important;
  color: var(--blue, #d4af5a) !important;
  white-space:nowrap;
}
.ck-panel .ck-actions{ margin-top: 18px; justify-content:flex-end; }

/* interruptor */
.ck-switch{
  appearance:none; -webkit-appearance:none;
  flex-shrink:0;
  width: 42px; height: 24px;
  border-radius: 999px;
  background: var(--surface-2, #182648);
  border: 1px solid var(--line-strong, rgba(245,240,230,0.18));
  position:relative;
  cursor:pointer;
  transition: background .2s, border-color .2s;
  margin:0;
}
.ck-switch::after{
  content:'';
  position:absolute; top:3px; left:3px;
  width:16px; height:16px;
  border-radius:50%;
  background: var(--muted, #a9b0c0);
  transition: transform .2s, background .2s;
}
.ck-switch:checked{ background: var(--blue, #d4af5a); border-color: var(--blue, #d4af5a); }
.ck-switch:checked::after{ transform: translateX(18px); background: var(--bg, #0b1426); }

/* enlaces a políticas, aviso GPC y texto del panel */
.ck-text .ck-links, .ck-panel .ck-links{ margin-top: 8px !important; font-size: 12.5px !important; }
.ck-panel .ck-links{ margin: 4px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--line, rgba(245,240,230,0.10)); }
.ck-panel p{ margin:0 0 14px; font-size: 13.5px; line-height:1.55; color: var(--muted, #a9b0c0); }
.ck-panel a, .ck-links a{ color: var(--blue, #d4af5a); }
.ck .ck-gpc{
  margin: 10px 0 0 !important;
  padding: 10px 12px;
  border-left: 3px solid var(--blue, #d4af5a);
  background: var(--blue-dim, rgba(212,175,90,0.17));
  border-radius: 6px;
  font-size: 12.5px !important;
  color: var(--text, #f5f0e6) !important;
}
.ck-panel .ck-gpc{ margin: 0 0 14px !important; }
.ck-switch:disabled{ opacity:.45; cursor:not-allowed; }

/* botón flotante para reabrir las preferencias */
.ck-fab{
  position:fixed; left:16px; bottom:16px; z-index:99;
  width:44px; height:44px; border-radius:50%;
  display:grid; place-items:center;
  background: var(--surface, #111d35);
  color: var(--text, #f5f0e6);
  border: 1px solid var(--line-strong, rgba(245,240,230,0.18));
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  cursor:pointer; padding:0;
}
.ck-fab:hover{ border-color: var(--blue, #d4af5a); color: var(--blue, #d4af5a); }
.ck-fab:focus-visible{ outline: 2px solid var(--green, #8fb0e8); outline-offset: 3px; }
.ck-fab[hidden]{ display:none; }
.ck-fab svg{ width:22px; height:22px; }
@media print{ .ck, .ck-fab{ display:none !important; } }

@media (max-width: 760px){
  .ck-banner{ flex-direction:column; align-items:stretch; padding: 20px; gap: 16px; }
  .ck-actions{ flex-direction: column-reverse; }
  .ck-btn{ width:100%; }
  .ck-panel .ck-actions{ flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce){
  .ck-switch, .ck-switch::after, .ck-btn{ transition:none; }
}
