/* ============================================================
   BANNER + MODAL DE COOKIES (rediseño)
   Mantiene todas las clases/IDs que usa cookie_consent.js
   ============================================================ */

.srn-cookie-banner[hidden],
.srn-cookie-prefs[hidden] {
  display: none !important;
}

/* ── Banner ───────────────────────────────────────────── */
.srn-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0, 0, 0, .4));
  animation: srn-cookie-in .3s ease both;
}
@keyframes srn-cookie-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.srn-cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 24px;
  max-width: var(--container, 1200px);
  margin: 0 auto;
}
.srn-cookie-banner__content { flex: 1; min-width: 0; }
.srn-cookie-banner__title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.srn-cookie-banner__text { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.srn-cookie-banner__text a { color: var(--accent); font-weight: 600; text-decoration: none; }
.srn-cookie-banner__text a:hover { text-decoration: underline; }
.srn-cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ── Botones ──────────────────────────────────────────── */
.srn-cookie-btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.srn-cookie-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.srn-cookie-btn--secondary:hover { border-color: var(--accent-border); color: var(--accent); }
.srn-cookie-btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(122, 12, 255, .28);
}
.srn-cookie-btn--primary:hover { background: var(--accent-strong); color: #fff; }

/* ── Modal de preferencias ────────────────────────────── */
.srn-cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.srn-cookie-prefs__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 14, .6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.srn-cookie-prefs__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg, 0 24px 70px rgba(0, 0, 0, .5));
  animation: srn-cookie-in .25s ease both;
}
.srn-cookie-prefs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}
.srn-cookie-prefs__header h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); margin: 0; }
.srn-cookie-prefs__close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .15s ease, border-color .15s ease;
}
.srn-cookie-prefs__close:hover { color: var(--accent); border-color: var(--accent-border); }
.srn-cookie-prefs__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.srn-cookie-prefs__body { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; }
.srn-cookie-prefs__intro { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* ── Categorías ───────────────────────────────────────── */
.srn-cookie-cat { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--surface-2); }
.srn-cookie-cat:last-child { margin-bottom: 0; }
.srn-cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.srn-cookie-cat__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; }
.srn-cookie-cat__title label { cursor: pointer; }
.srn-cookie-cat__pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.srn-cookie-cat__desc { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0; }

/* ── Interruptor ──────────────────────────────────────── */
.srn-cookie-switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.srn-cookie-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.srn-cookie-switch__slider {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background .2s ease;
  flex-shrink: 0;
}
.srn-cookie-switch__slider::before {
  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, .3);
  transition: transform .2s ease;
}
.srn-cookie-switch input:checked + .srn-cookie-switch__slider { background: var(--accent); }
.srn-cookie-switch input:checked + .srn-cookie-switch__slider::before { transform: translateX(18px); }
.srn-cookie-switch input:focus-visible + .srn-cookie-switch__slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.srn-cookie-switch__text { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.srn-cookie-switch__text--on { display: none; }
.srn-cookie-switch__text--off { display: inline; }
.srn-cookie-switch input:checked ~ .srn-cookie-switch__text--on { display: inline; }
.srn-cookie-switch input:checked ~ .srn-cookie-switch__text--off { display: none; }

.srn-cookie-prefs__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 26px;
  border-top: 1px solid var(--border);
}

/* ── Móvil ────────────────────────────────────────────── */
@media (max-width: 720px) {
  .srn-cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .srn-cookie-banner__actions { flex-wrap: wrap; }
  .srn-cookie-banner__actions .srn-cookie-btn { flex: 1; }
}
@media (max-width: 480px) {
  .srn-cookie-prefs__footer { flex-direction: column; }
  .srn-cookie-prefs__footer .srn-cookie-btn { width: 100%; }
}
