/* Banner de consentimiento de cookies. Solo se enlaza cuando hay analítica configurada (Base.astro). Paleta oficial. */
.cc {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  padding: .75rem max(.75rem, env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  font-family: "Google Sans Flex", "GSF Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  pointer-events: none;
}
.cc[hidden] { display: none; }
.cc__panel {
  pointer-events: auto; box-sizing: border-box; max-width: 44rem; margin: 0 auto;
  max-height: min(82vh, 40rem); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: #1d1d1b; border: 1px solid rgb(1 53 65 / .3); border-top: 4px solid #013541; border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem; box-shadow: 0 12px 40px -10px rgb(1 37 45 / .35);
}
.cc__title { margin: 0 0 .35rem; font-size: 1.125rem; line-height: 1.25; font-weight: 600; color: #013541; }
.cc__title:focus { outline: none; }
.cc__title:focus-visible { outline: 3px solid #005468; outline-offset: 3px; }
.cc__text { margin: 0 0 .85rem; font-size: .9375rem; line-height: 1.5; color: #1d1d1b; }
.cc__text a { color: #005468; text-decoration: underline; text-underline-offset: .15em; }
.cc__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
/* Aceptar, Rechazar y Configurar: mismo tamaño, mismo estilo y misma prominencia. */
.cc__btn {
  box-sizing: border-box; min-height: 2.75rem; padding: .5rem .75rem; border-radius: 4px; cursor: pointer;
  background: #013541; color: #fff; border: 2px solid #013541;
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2; text-align: center;
}
.cc__btn:hover { background: #005468; border-color: #005468; }
.cc__btn:focus-visible, .cc-link:focus-visible, .cc__switch:focus-visible { outline: 3px solid #005468; outline-offset: 2px; }
.cc__btn--save { margin-top: .85rem; width: 100%; }
.cc__prefs { margin-top: .85rem; border-top: 1px solid rgb(1 53 65 / .18); padding-top: .75rem; }
.cc__prefs[hidden] { display: none; }
.cc__fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.cc__legend { padding: 0; margin: 0 0 .25rem; font-size: .9375rem; font-weight: 600; color: #013541; }
.cc__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid rgb(1 53 65 / .12); }
.cc__label { display: flex; flex-direction: column; gap: .1rem; cursor: pointer; }
.cc__name { font-size: .9375rem; font-weight: 600; color: #1d1d1b; }
.cc__desc { font-size: .8125rem; line-height: 1.4; color: #3c5a63; }
.cc__switch {
  flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 3rem; height: 1.75rem; margin: 0;
  border-radius: 999px; background: #5d7882; border: 2px solid #3c5a63; cursor: pointer; transition: background-color 160ms;
}
.cc__switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff; transition: transform 160ms; }
.cc__switch:checked { background: #013541; border-color: #013541; }
.cc__switch:checked::after { transform: translateX(1.25rem); }
.cc__switch:disabled { cursor: not-allowed; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .cc__switch, .cc__switch::after { transition: none; } }
@media (max-width: 479.98px) {
  .cc { padding: .5rem max(.5rem, env(safe-area-inset-right)) calc(.5rem + env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left)); }
  .cc__panel { max-height: 78vh; padding: .85rem .85rem .9rem; }
  .cc__text { font-size: .875rem; margin-bottom: .7rem; }
  .cc__actions { grid-template-columns: 1fr 1fr; }
  .cc__actions .cc__btn:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) { .cc { left: 50%; right: auto; transform: translateX(-50%); width: min(44rem, calc(100vw - 2rem)); padding-inline: 0; } }
/* Enlace del pie: aspecto de enlace legal, accesible por teclado. */
.cc-link {
  display: inline-flex; min-height: 2.75rem; align-items: center; padding: 0; margin: 0;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: none;
}
.cc-link:hover { color: var(--sky, #76b0bd); }
@media print { .cc { display: none; } }
