/* =========================================================
   KAOTICA SPAIN · COOKIE CONSENT
   ========================================================= */

:root {
  --kc-bg: #111114;
  --kc-panel: #19191d;
  --kc-text: #ffffff;
  --kc-muted: rgba(255,255,255,.64);
  --kc-border: rgba(255,255,255,.13);
  --kc-light: #ffffff;
  --kc-dark: #111114;
  --kc-radius: 20px;
}

.kc-hidden {
  display: none !important;
}

/* Backdrop solo para el panel de configuración */
.kc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(5px);
}

/* Banner principal */
.kc-banner {
  position: fixed;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--kc-border);
  border-radius: var(--kc-radius);
  background: var(--kc-bg);
  color: var(--kc-text);
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
}

.kc-banner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.kc-copy {
  max-width: 760px;
}

.kc-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.5);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.kc-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.kc-text {
  margin: 0;
  color: var(--kc-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.kc-text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Botones */
.kc-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
}

.kc-btn {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.kc-btn:hover {
  transform: translateY(-1px);
}

.kc-btn-primary,
.kc-btn-reject {
  /* Aceptar y Rechazar con igual peso visual */
  background: #fff;
  color: #111;
  border-color: #fff;
}

.kc-btn-config {
  background: transparent;
  color: #fff;
}

/* Modal de configuración */
.kc-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 99998;
  width: min(650px, calc(100% - 32px));
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 30px;
  border: 1px solid var(--kc-border);
  border-radius: 24px;
  background: var(--kc-panel);
  color: #fff;
  box-shadow: 0 30px 100px rgba(0,0,0,.42);
}

.kc-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.kc-modal-head h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.kc-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--kc-border);
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
}

.kc-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--kc-border);
}

.kc-category h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.kc-category p {
  margin: 0;
  color: var(--kc-muted);
  font-size: .86rem;
  line-height: 1.55;
}

.kc-status {
  font-size: .77rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Switch */
.kc-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 29px;
}

.kc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.kc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 999px;
  background: #555;
  transition: .2s;
}

.kc-slider:before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: white;
  transition: .2s;
}

.kc-switch input:checked + .kc-slider {
  background: #fff;
}

.kc-switch input:checked + .kc-slider:before {
  transform: translateX(23px);
  background: #111;
}

.kc-switch input:disabled + .kc-slider {
  opacity: .55;
  cursor: not-allowed;
}

.kc-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 26px;
}

.kc-modal-actions .kc-btn {
  width: 100%;
}

/* Botón permanente */
.kc-reopen {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99990;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
}

/* Accesibilidad */
.kc-btn:focus-visible,
.kc-close:focus-visible,
.kc-reopen:focus-visible,
.kc-switch input:focus-visible + .kc-slider {
  outline: 3px solid rgba(255,255,255,.6);
  outline-offset: 3px;
}

/* Responsive */
@media (max-width: 900px) {
  .kc-banner-inner {
    grid-template-columns: 1fr;
  }

  .kc-actions {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .kc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 20px;
    border-radius: 18px;
  }

  .kc-actions {
    grid-template-columns: 1fr;
  }

  .kc-modal {
    width: calc(100% - 20px);
    padding: 22px 18px;
  }

  .kc-category {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .kc-modal-actions {
    grid-template-columns: 1fr;
  }

  .kc-reopen {
    left: 10px;
    bottom: 10px;
  }
}
