/*
 * Cookie and consent bar (templates/consent/banner.pug, js/consent.js).
 * Fixed to the bottom, over the page: showing it moves nothing (no layout
 * shift). Colors from the --ab-* variables of site.json brand (base/critical),
 * with the --ab-consent-* variables to adjust a site without touching this file.
 * Theme "dark": the bar in the brand color, like the bars of Pídala, Sociedad
 * and QQW. Theme "light": a white bar with a border.
 */
.ab-consent {
  --ab-consent-bg: linear-gradient(135deg, var(--ab-color-primario, #087a52) 0%, var(--ab-color-primario-oscuro, #033a26) 100%);
  --ab-consent-fg: var(--ab-color-sobre-primario, #fff);
  --ab-consent-btn-bg: #fff;
  --ab-consent-btn-fg: var(--ab-color-primario-oscuro, #033a26);
  --ab-consent-btn-border: #fff;
  --ab-consent-panel-bg: var(--ab-color-superficie, #fff);
  --ab-consent-panel-fg: var(--ab-color-texto, #1a1a1a);
  --ab-consent-accent: var(--ab-color-primario, #087a52);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  font-family: var(--ab-fuente, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size: 1rem;
  line-height: 1.4;
  box-sizing: border-box;
}
.ab-consent[hidden], .ab-consent [hidden] { display: none !important; }
.ab-consent *, .ab-consent *::before, .ab-consent *::after { box-sizing: border-box; }
.ab-consent--light {
  --ab-consent-bg: var(--ab-color-superficie, #fff);
  --ab-consent-fg: var(--ab-color-texto, #1a1a1a);
  --ab-consent-btn-bg: var(--ab-color-primario, #087a52);
  --ab-consent-btn-fg: var(--ab-color-sobre-primario, #fff);
  --ab-consent-btn-border: var(--ab-color-primario, #087a52);
}
.ab-consent__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  padding: .6rem 1rem;
  background: var(--ab-consent-bg);
  color: var(--ab-consent-fg);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .2);
}
.ab-consent--light .ab-consent__bar { border-top: 1px solid var(--ab-color-borde-suave, #d4e1dd); }
.ab-consent__texts { flex: 1 1 22rem; min-width: 0; }
.ab-consent .ab-consent__title { margin: 0 0 .15rem; font-size: .95rem; font-weight: 700; color: inherit; }
.ab-consent .ab-consent__text { margin: 0; font-size: .8rem; color: inherit; opacity: .95; }
.ab-consent .ab-consent__text a, .ab-consent .ab-consent__text a:visited { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ab-consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* The three answers look the same: none is easier to click than the others */
.ab-consent .ab-consent__btn {
  margin: 0;
  min-width: 8.5rem;
  min-height: 2.5rem;
  padding: .5rem 1rem;
  border: 2px solid var(--ab-consent-btn-border);
  border-radius: var(--ab-radio, 12px);
  background: var(--ab-consent-btn-bg);
  color: var(--ab-consent-btn-fg);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  cursor: pointer;
}
.ab-consent .ab-consent__btn:hover { filter: brightness(.94); }
.ab-consent .ab-consent__btn:focus-visible, .ab-consent input:focus-visible, .ab-consent a:focus-visible, .ab-consent__panel-title:focus-visible {
  outline: 3px solid var(--ab-color-acento, #ffbf47);
  outline-offset: 2px;
}
.ab-consent__panel {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  background: var(--ab-consent-panel-bg);
  color: var(--ab-consent-panel-fg);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .15);
}
.ab-consent__panel-inner { max-width: 44rem; margin: 0 auto; }
.ab-consent .ab-consent__panel-title { margin: 0 0 .75rem; font-size: 1.1rem; font-weight: 700; color: inherit; }
.ab-consent__options { list-style: none; margin: 0 0 1rem; padding: 0; }
.ab-consent__option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 0 0 .5rem;
  padding: .75rem;
  border-radius: var(--ab-radio, 8px);
  background: var(--ab-color-fondo-suave, #f3f5f4);
}
.ab-consent__option input { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; flex-shrink: 0; accent-color: var(--ab-consent-accent); cursor: pointer; }
.ab-consent__option input:disabled { cursor: not-allowed; }
.ab-consent__option label { display: flex; flex-direction: column; gap: .2rem; margin: 0; font-weight: 400; cursor: pointer; }
.ab-consent__option strong { font-size: .95rem; }
.ab-consent__option span { font-size: .85rem; opacity: .85; }
.ab-consent__panel-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.ab-consent__panel .ab-consent__btn {
  --ab-consent-btn-bg: var(--ab-color-primario, #087a52);
  --ab-consent-btn-fg: var(--ab-color-sobre-primario, #fff);
  --ab-consent-btn-border: var(--ab-color-primario, #087a52);
}
/* The footer link that opens the preferences again */
.ab-consent-link { cursor: pointer; }
button.ab-consent-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; }
@media (max-width: 640px) {
  .ab-consent__bar { padding: .6rem .75rem; }
  .ab-consent__actions { width: 100%; }
  .ab-consent .ab-consent__btn { flex: 1 1 0; min-width: 0; padding: .5rem .4rem; font-size: .85rem; }
  .ab-consent__panel { max-height: 85vh; }
}
@media print { .ab-consent { display: none !important; } }

/* Site themes that style every button and checkbox label with !important
   (abrimos.info, HTML5 UP Editorial: button { color: … !important },
   input[type=checkbox] + label { display: inline-block }) must not win inside
   the bar: the panel buttons stayed text-colored on their own background. */
.ab-consent .ab-consent__panel .ab-consent__btn { color: var(--ab-consent-btn-fg, #fff) !important; }
.ab-consent .ab-consent__option label { display: flex !important; flex-direction: column; padding-left: 0; }
.ab-consent .ab-consent__option label::before, .ab-consent .ab-consent__option label::after { content: none !important; display: none !important; }
.ab-consent .ab-consent__option input[type="checkbox"] { -webkit-appearance: auto; appearance: auto; opacity: 1; position: static; margin-right: 0; }
