/* Maps rapttor/yii2-themes tokens onto Bootstrap 5 variables, so the whole UI follows the chosen theme. */
:root:root {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface);
  --bs-border-color: var(--line);
  --bs-link-color: var(--link);
  --bs-link-hover-color: var(--link);
  --bs-emphasis-color: var(--text);
}
.navbar.bg-dark { background: var(--surface) !important; border-bottom: 1px solid var(--line); box-shadow: var(--elev-sm); }
.navbar .navbar-brand, .navbar .nav-link { color: var(--text) !important; }
.navbar .nav-link:hover { color: var(--link) !important; }
.navbar-toggler { border-color: var(--line); }
.btn-primary, .btn-dark { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: var(--brand-ink);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--brand-ink);
  --bs-btn-active-bg: var(--brand); --bs-btn-active-color: var(--brand-ink); }
.card, .list-group-item, .table { --bs-card-bg: var(--surface); --bs-card-border-color: var(--line); --bs-table-bg: transparent; --bs-table-color: var(--text); color: var(--text); }
.card { box-shadow: var(--elev); }
.form-control, .form-select { background-color: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--elev-in); }
.hero-banner { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line); box-shadow: var(--elev); }
.hero-banner .lead { color: var(--muted); }
footer { background: var(--surface) !important; border-top: 1px solid var(--line); }
.legal-links ul, .legal-languages ul, ul.legal-links, ul.legal-languages { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }

/* footer: brand | legal links | tools, one row on desktop, stacked and centred on mobile */
.site-footer { position: relative; padding: 1.25rem 0; font-size: .875rem; color: var(--muted); }
.site-footer a, .site-footer summary { color: var(--muted); text-decoration: none; }
.site-footer a:hover, .site-footer summary:hover { color: var(--text); text-decoration: underline; text-underline-offset: .2em; }
.site-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; }
.site-footer__brand { display: flex; align-items: baseline; gap: .5rem; }
.site-footer__brand strong { color: var(--text); font-weight: 600; }
.site-footer__links { flex: 1; }
.site-footer__links ul.legal-links { justify-content: center; gap: .25rem 1.5rem; }
.site-footer__tools { display: flex; align-items: center; gap: .5rem 1.25rem; position: relative; }
.site-footer__tools .legal-cookie-link, .site-footer__tools [data-feedback-open] { margin: 0 !important; }
.site-footer__lang summary { cursor: pointer; list-style: none; padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 999px; }
.site-footer__lang summary::-webkit-details-marker { display: none; }
.site-footer__lang summary::before { content: "\1F310\00a0"; }
.site-footer__lang summary::after { content: "\00a0\25BE"; font-size: .75em; }
.site-footer__lang[open] summary { color: var(--text); border-color: var(--link); }
.site-footer__lang ul.legal-languages {
  position: absolute; right: 0; bottom: calc(100% + .5rem); z-index: 1030; width: max-content; max-width: min(34rem, 92vw);
  padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; box-shadow: var(--elev);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .35rem 1rem;
}
.site-footer__lang li.is-current a { color: var(--text); font-weight: 600; }
@media (max-width: 767.98px) {
  .site-footer__row { flex-direction: column; text-align: center; gap: 1rem; }
  .site-footer__links ul.legal-links { justify-content: center; }
  .site-footer__tools { flex-wrap: wrap; justify-content: center; position: static; }
  .site-footer__lang ul.legal-languages { left: 4vw; right: 4vw; max-width: none; width: auto; }
}
.bg-body-tertiary { background-color: var(--surface) !important; color: var(--text); }
