/* ========== BANNER DE COOKIES ========== */
.cookie-banner {
  position: fixed;
  z-index: 300;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, .96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 6px rgba(248, 250, 252, .03);
  animation: cookie-in .45s var(--ease);
}
.cookie-inner { display: grid; gap: 18px; padding: 24px; }
.cookie-title { color: var(--ink); font-family: var(--font-display); font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.cookie-text { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.cookie-text a { text-decoration: underline; text-underline-offset: 3px; }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { flex: 1 1 auto; min-height: 44px; font-size: 15px; }
/* "Rechazar" tan visible y fácil como "Aceptar" (criterio AEPD) */
.cookie-actions [data-cookie-action="reject"] { background: transparent; color: var(--ink); border-color: var(--line2); }
.cookie-actions [data-cookie-action="reject"]:hover { border-color: var(--ink-soft); }

.cookie-settings { display: grid; gap: 12px; }
.cookie-cat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(30, 41, 59, .45); }
.cookie-cat-title { color: var(--ink); font-size: 16px; font-weight: 500; }
.cookie-cat-title small { color: var(--muted); font-size: 13px; font-weight: 400; }
.cookie-cat-text { margin-top: 6px; padding-left: 56px; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Interruptor */
.cookie-switch { position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.cookie-switch input { position: absolute; z-index: 1; opacity: 0; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.cookie-switch-ui {
  position: relative; flex: none;
  width: 42px; height: 24px; border-radius: 999px;
  background: var(--steel);
  transition: background .25s var(--ease);
}
.cookie-switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink);
  transition: transform .25s var(--ease);
}
.cookie-switch input:checked + .cookie-switch-ui { background: var(--accent); }
.cookie-switch input:checked + .cookie-switch-ui::after { transform: translateX(18px); }
.cookie-switch input:disabled { cursor: not-allowed; }
.cookie-switch input:disabled + .cookie-switch-ui { opacity: .6; }
.cookie-switch input:focus-visible + .cookie-switch-ui { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* Enlace del pie para reabrir */
.footer-cookie-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink-soft); font-size: 17px; font-weight: 300; text-align: left;
}
.footer-cookie-btn:hover { color: var(--accent-text); }

@keyframes cookie-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .cookie-inner { padding: 18px; }
  .cookie-actions .btn { flex: 1 1 45%; }
  .cookie-cat-text { padding-left: 0; }
}
