/* Aviso de cookies (ver public/assets/cookie-consent.js).
 *
 * Toma los tokens del tema (--surface, --ink, --border, --accent…) con un
 * valor neutro de respaldo, así encaja en cualquier web sin tocarla. Un tema
 * puede afinarlo redefiniendo estas clases en su propia hoja.
 *
 * Los tres botones tienen el mismo peso visual a propósito: rechazar no puede
 * parecer menos importante que aceptar (guía de cookies de la AEPD, 2023). */

.cookie-consent {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 90;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.cookie-consent__box {
  pointer-events: auto;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 20px 22px;
  border: 1px solid var(--border, #e3e5e8);
  border-radius: var(--radius-panel, 12px);
  background: var(--surface, #ffffff);
  color: var(--ink, #16181c);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  line-height: 1.5;
}
.cookie-consent__title { margin: 0; font-weight: 700; font-size: 16px; }
.cookie-consent__text { margin: 6px 0 0; color: var(--ink-muted, #5c626b); max-width: none; }
.cookie-consent__text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.cookie-consent__settings { margin-top: 14px; display: grid; gap: 10px; }
.cookie-consent__settings[hidden] { display: none; }
.cookie-consent__option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border, #e3e5e8);
  border-radius: var(--radius-control, 8px);
  cursor: pointer;
}
.cookie-consent__option input { margin-top: 4px; accent-color: var(--accent, #3d4a6f); }
.cookie-consent__option input:disabled { cursor: not-allowed; }
.cookie-consent__option-copy { display: grid; gap: 2px; }
.cookie-consent__option-copy span { color: var(--ink-muted, #5c626b); font-size: 14px; }

.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cookie-consent__button {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--accent, #3d4a6f);
  border-radius: var(--radius-control, 8px);
  background: var(--accent, #3d4a6f);
  color: var(--accent-ink, #ffffff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cookie-consent__button:hover { filter: brightness(1.06); }
.cookie-consent__button:focus-visible,
.cookie-consent__prefs:focus-visible { outline: 2px solid var(--ink, #16181c); outline-offset: 2px; }

/* Enlace «Preferencias de cookies» que añade el script si el tema no puso
 * ninguno: discreto, hereda el color del pie. */
.cookie-consent__prefs {
  display: inline-block;
  margin: 12px auto;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
  cursor: pointer;
}
.cookie-consent__prefs--flotante {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 85;
  margin: 0;
  border-radius: 999px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e3e5e8);
}

@media (max-width: 560px) {
  .cookie-consent { inset: auto 8px 8px; }
  .cookie-consent__button { flex-basis: 100%; }
}
