/* Aviso de cookies. Misma paleta que styles.css: negro, blanco, sin acento de color
   que haga un botón más fácil que otro. */
.cestral-consent {
  position: fixed;
  z-index: 1000;
  inset: auto 0 0 0;
  background: #000;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.35);
}

.cestral-consent[hidden] { display: none !important; }

.cestral-consent-inner {
  max-width: 760px;
  max-height: min(78vh, 640px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* El anillo global alrededor de todo el aviso parece un marco. Lo llevan los botones y el enlace. */
.cestral-consent-inner:focus,
.cestral-consent-inner:focus-visible,
.consent-options:focus,
.consent-options:focus-visible { outline: none; }

.consent-scroll {
  min-height: 0;
  overflow: auto;
}

.cestral-consent h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: #fff;
}

.cestral-consent p { margin: 0 0 14px; color: rgba(255, 255, 255, 0.82); font-size: 15px; }

.cestral-consent a { color: #fff; }

.consent-note {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.consent-options {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.consent-options[hidden] { display: none !important; }

.consent-back {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.consent-choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.consent-choice input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #fff;
}

.consent-choice label { display: grid; gap: 2px; cursor: pointer; }

.consent-choice input:disabled + label { cursor: default; }

.consent-choice-title { color: #fff; font-weight: 600; font-size: 15px; }

.consent-choice-help { color: rgba(255, 255, 255, 0.82); font-size: 14px; font-weight: 400; }

.consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: none;
  margin: 12px 0;
}

.consent-btn {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.consent-btn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.consent-links { flex: none; margin: 0; font-size: 14px; }

.consent-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer button.cookie-settings {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.site-footer button.cookie-settings:hover { color: #fff; }

@media (max-width: 640px) {
  .cestral-consent { padding-inline: 16px; }
  .consent-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cestral-consent { scroll-behavior: auto; }
}

@media print {
  .cestral-consent { display: none !important; }
}
