/* =========================================
   AUTO KING · AVISO Y PREFERENCIAS DE COOKIES
   Misma estética que la web: negro, rojo, Anton + Inter.
========================================= */

/* Aviso (primera capa) */
.ck-banner {
  position: fixed; z-index: 2900; left: 20px; right: 20px; bottom: 20px;
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center;
  padding: 20px 24px;
  background: rgba(17, 18, 20, .97); color: #f5f5f5;
  border: 1px solid #34353a; border-top: 2px solid var(--red, #ef352e);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-family: "Inter", Arial, sans-serif; font-size: 13px; line-height: 1.55;
  animation: ck-entrar .3s ease-out;
}
@keyframes ck-entrar { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.ck-titulo { margin: 0 0 4px; color: var(--red, #ef352e); font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.ck-banner p { margin: 0; color: #c9cacf; }
.ck-banner p strong { color: #f5f5f5; }
.ck-banner a { color: #f5f5f5; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ck-banner a:hover { color: var(--red-bright, #ff493e); }
.ck-banner-botones { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }

/* Botones: «Aceptar» y «Rechazar» con el mismo formato y visibilidad */
.ck-btn {
  min-height: 44px; padding: 0 20px; border: 1px solid #f5f5f5; border-radius: 0;
  background: transparent; color: #f5f5f5; cursor: pointer;
  font-family: "Inter", Arial, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .8px;
  transition: background .2s, color .2s, border-color .2s;
}
.ck-btn:hover { background: #f5f5f5; color: #111; }
.ck-btn-secundario { border-color: #55565c; color: #c9cacf; }
.ck-btn-secundario:hover { border-color: #f5f5f5; }
.ck-enlace {
  min-height: 44px; padding: 0 6px; border: 0; background: none; color: #c9cacf; cursor: pointer;
  font-family: "Inter", Arial, sans-serif; font-size: 12px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.ck-enlace:hover { color: #fff; }
.ck-btn:focus-visible, .ck-enlace:focus-visible, .ck-cerrar:focus-visible,
.footer-cookies-btn:focus-visible, .map-consent-config:focus-visible { outline: 2px solid var(--red-bright, #ff493e); outline-offset: 3px; }

/* Preferencias (segunda capa) */
body.ck-abierto { overflow: hidden; }
.ck-modal {
  position: fixed; inset: 0; z-index: 6000; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ck-modal[hidden] { display: none; }
.ck-caja {
  width: min(620px, 100%); max-height: 92vh; overflow-y: auto;
  padding: 28px; background: linear-gradient(145deg, #141518, #0c0c0e); color: #f5f5f5;
  border: 1px solid #34353a; border-top: 2px solid var(--red, #ef352e);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .65);
  font-family: "Inter", Arial, sans-serif; font-size: 14px; line-height: 1.6;
}
.ck-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ck-caja h2 { margin: 0; font-family: "Anton", sans-serif; font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: .3px; }
.ck-cerrar { width: 40px; height: 40px; flex-shrink: 0; border: 1px solid #55565c; background: #080808; color: #fff; font-size: 22px; cursor: pointer; }
.ck-intro { margin: 12px 0 18px; color: #b9bac0; }
.ck-categoria { padding: 16px 0; border-top: 1px solid #2a2b2f; }
.ck-categoria p { margin: 8px 0 0; color: #a9aab0; font-size: 13px; }
.ck-categoria-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.ck-categoria-cabecera label { cursor: pointer; }
.ck-siempre { color: #3ccf86; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.ck-tercero { margin-left: 6px; padding: 2px 8px; border: 1px solid #44454b; border-radius: 999px; color: #b9bac0; font-size: 10px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
.ck-interruptor { position: relative; flex-shrink: 0; width: 48px; height: 28px; }
.ck-interruptor input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ck-interruptor span { position: absolute; inset: 0; border-radius: 999px; background: #3a3b41; transition: background .2s; }
.ck-interruptor span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ck-interruptor input:checked + span { background: var(--red, #ef352e); }
.ck-interruptor input:checked + span::after { transform: translateX(20px); }
.ck-interruptor input:focus-visible + span { outline: 2px solid var(--red-bright, #ff493e); outline-offset: 3px; }
.ck-modal-botones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }

/* Mapa bloqueado hasta el consentimiento */
.map-consent {
  height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(239, 53, 46, .08), transparent 55%), #14161b;
}
.map-consent p { margin: 0; color: #a9aab0; font-size: 12px; line-height: 1.55; }
.map-consent p strong { display: block; margin-bottom: 4px; color: #f5f5f5; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; }
.map-consent .btn { min-height: 40px; background: transparent; font-family: inherit; }
.map-consent .btn:hover { background: #f5f5f5; color: #111; }
.map-consent-config, .footer-cookies-btn {
  padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit;
}
.map-consent-config { color: #969ba6; font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.map-consent-config:hover { color: #fff; }
.footer-cookies-btn { color: #969ba6; font-size: 9px; font-weight: 800; letter-spacing: 1px; transition: .2s; }
.footer-cookies-btn:hover { color: #f04432; }

/* Móvil */
@media (max-width: 760px) {
  .ck-banner { left: 10px; right: 10px; bottom: 10px; grid-template-columns: 1fr; padding: 16px; font-size: 12.5px; }
  .ck-banner-botones { display: grid; grid-template-columns: 1fr 1fr; }
  .ck-banner-botones .ck-enlace { grid-column: 1 / -1; }
  .ck-caja { padding: 22px 18px; }
  .ck-caja h2 { font-size: 26px; }
  .ck-modal-botones { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ck-banner { animation: none; } }
