/* ====== COOKIES MODAL ====== */
.cookies-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  z-index: 9998;
}

.cookies-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookies-card {
  width: min(680px, 100%);
  background: #fff;
  color: var(--color-texto);
  border-radius: var(--radio-borde);
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  overflow: hidden;
  font-size: 0.95rem;
}

.cookies-head {
  background: #f6f6f3;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.cookies-title {
  margin: 0;
  font-family: var(--fuente-titulos);
  color: var(--color-principal);
  font-size: 1.2rem;
}

.cookies-body {
  padding: 1rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.cookies-desc {
  margin: 0;
  line-height: 1.6;
}

.cookies-cats {
  display: grid;
  gap: .75rem;
}

.cookie-cat {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: .75rem .9rem;
  background: #fff;
}

.cookie-cat h4 {
  margin: 0 0 .3rem 0;
  font-size: 1rem;
  color: var(--color-texto);
}

.cookie-cat p {
  margin: 0;
  opacity: .9;
}

.cookie-switch {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}

.cookie-switch input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  background: #e5e7eb;
  border-radius: 999px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background .2s ease;
}
.cookie-switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.cookie-switch input[type="checkbox"]:checked {
  background: var(--color-principal);
}
.cookie-switch input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.cookie-switch input[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

.cookies-actions {
  display: grid;
  gap: .6rem;
  grid-template-columns: 1fr;
  padding: 1rem 1.25rem 1.25rem;
  background: #fafafa;
  border-top: 1px solid rgba(0,0,0,.06);
}

.cookies-actions .btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,.1);
  background: #fff;
  color: var(--color-texto);
  padding: .8rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}
.cookies-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}
.cookies-actions .btn-primario {
  background: var(--color-principal);
  color: #fff;
  border-color: var(--color-principal);
}
.cookies-actions .btn-ghost {
  background: #fff;
}

@media (min-width: 640px){
  .cookies-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Enlace persistente de preferencias (puede ir en el footer) */
.cookie-preferences-link {
  font-size: .9rem;
  opacity: .85;
  text-decoration: underline;
  cursor: pointer;
}
