/* Berger BI — cookie consent banner + accessibility menu.
   Lives outside the dc-runtime root so page re-renders never remove it. */

.bbi-x, .bbi-x * { box-sizing: border-box; }
.bbi-x {
  font-family: 'Heebo', 'DM Sans', Arial, sans-serif;
  color: #1F4570;
  line-height: 1.5;
}
.bbi-x button { font: inherit; }
.bbi-x :focus-visible { outline: 2px solid #1F4570; outline-offset: 3px; }

/* ---------- cookie banner ---------- */
.bbi-cookie {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 760px;
  margin: 0 auto;
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 16px 40px rgba(27, 42, 65, .18), inset 0 1px 0 rgba(255, 255, 255, .9);
  font-size: 14px;
}
.bbi-cookie[hidden] { display: none; }
.bbi-cookie p { margin: 0; flex: 1 1 260px; color: #1F4570; }
.bbi-cookie a { color: #1F4570; text-decoration: underline; font-weight: 600; }
.bbi-cookie-actions { display: flex; gap: 8px; flex: none; }
.bbi-btn {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #1F4570;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: background 160ms, color 160ms;
}
.bbi-btn-primary { background: #1F4570; color: #ffffff; }
.bbi-btn-primary:hover { background: #0B1626; }
.bbi-btn-ghost { background: rgba(255, 255, 255, .6); color: #1F4570; }
.bbi-btn-ghost:hover { background: #ffffff; }

/* page-owned floating buttons (WhatsApp, back-to-top) lift with the banner like the a11y button.
   `translate` (not `transform`) so it composes with their own inline transforms. */
[data-bbi-float] {
  translate: 0 calc(-1 * var(--bbi-banner-offset, 0px));
  transition: translate 200ms;
}

/* ---------- accessibility button + panel ---------- */
.bbi-a11y-btn {
  position: fixed;
  left: 20px;
  bottom: calc(24px + var(--bbi-banner-offset, 0px));
  z-index: 72;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  background: #1F4570;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(27, 42, 65, .28);
  transition: bottom 200ms, background 160ms;
}
.bbi-a11y-btn:hover { background: #0B1626; }
.bbi-a11y-btn svg { width: 26px; height: 26px; display: block; }

.bbi-a11y-panel {
  position: fixed;
  left: 20px;
  bottom: calc(80px + var(--bbi-banner-offset, 0px));
  z-index: 73;
  width: min(320px, calc(100vw - 40px));
  max-height: calc(100vh - 110px - var(--bbi-banner-offset, 0px));
  overflow: auto;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 20px 50px rgba(27, 42, 65, .24);
  font-size: 14px;
}
.bbi-a11y-panel[hidden] { display: none; }
.bbi-a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.bbi-a11y-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: #1F4570; }
.bbi-a11y-close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(31, 69, 112, .25);
  background: transparent; color: #1F4570; cursor: pointer; font-size: 18px; line-height: 1;
}
.bbi-a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(31, 69, 112, .1); }
.bbi-a11y-row span { font-weight: 600; }
.bbi-a11y-size { display: flex; align-items: center; gap: 6px; }
.bbi-a11y-size button {
  min-width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(31, 69, 112, .3);
  background: #ffffff; color: #1F4570; cursor: pointer; font-weight: 700;
}
.bbi-a11y-size button[aria-disabled="true"] { opacity: .4; cursor: default; }
.bbi-a11y-size output { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; }
.bbi-a11y-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; margin-top: 6px; border-radius: 12px; border: 1px solid rgba(31, 69, 112, .2);
  background: #ffffff; color: #1F4570; cursor: pointer; font-weight: 600; text-align: start;
}
.bbi-a11y-toggle[aria-pressed="true"] { background: #1F4570; color: #ffffff; border-color: #1F4570; }
.bbi-a11y-toggle .bbi-state { font-size: 12px; font-weight: 700; opacity: .85; }
.bbi-a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.bbi-a11y-foot a { color: #1F4570; text-decoration: underline; font-weight: 600; }

@media (max-width: 480px) {
  .bbi-cookie { font-size: 13px; padding: 12px 14px; left: 10px; right: 10px; bottom: 12px; }
  .bbi-cookie-actions { width: 100%; }
  .bbi-cookie-actions .bbi-btn { flex: 1; }
}

/* ---------- accessibility modes (applied on <html>) ---------- */
/* text size: the page uses inline px sizes, so scale the page root */
html.a11y-zoom-1 :is(#dc-root, [data-a11y-root]) { zoom: 1.1; }
html.a11y-zoom-2 :is(#dc-root, [data-a11y-root]) { zoom: 1.2; }
html.a11y-zoom-3 :is(#dc-root, [data-a11y-root]) { zoom: 1.3; }

/* high contrast */
html.a11y-contrast :is(#dc-root, [data-a11y-root]),
html.a11y-contrast :is(#dc-root, [data-a11y-root]) * {
  background-color: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html.a11y-contrast :is(#dc-root, [data-a11y-root]) :is(a, button, [role="button"]),
html.a11y-contrast :is(#dc-root, [data-a11y-root]) :is(a, button, [role="button"]) * { color: #ffff00 !important; }
html.a11y-contrast :is(#dc-root, [data-a11y-root]) svg [stroke]:not([stroke="none"]) { stroke: currentColor !important; }
html.a11y-contrast :is(#dc-root, [data-a11y-root]) mark { background-color: transparent !important; text-decoration: underline; }
html.a11y-contrast body { background: #000000 !important; }
html.a11y-contrast .bbi-cookie,
html.a11y-contrast .bbi-a11y-panel { background: #000000; color: #ffffff; border-color: #ffffff; }
html.a11y-contrast .bbi-cookie p,
html.a11y-contrast .bbi-a11y-head h2,
html.a11y-contrast .bbi-a11y-close { color: #ffffff; }
html.a11y-contrast .bbi-cookie a,
html.a11y-contrast .bbi-a11y-foot a { color: #ffff00; }

/* highlight links and buttons */
html.a11y-links :is(#dc-root, [data-a11y-root]) a,
html.a11y-links :is(#dc-root, [data-a11y-root]) button,
html.a11y-links :is(#dc-root, [data-a11y-root]) [role="button"] {
  text-decoration: underline !important;
  outline: 2px solid #1F4570 !important;
  outline-offset: 2px !important;
}
html.a11y-links.a11y-contrast :is(#dc-root, [data-a11y-root]) :is(a, button, [role="button"]) { outline-color: #ffff00 !important; }

/* readable font */
html.a11y-font :is(#dc-root, [data-a11y-root]),
html.a11y-font :is(#dc-root, [data-a11y-root]) *,
html.a11y-font .bbi-x,
html.a11y-font .bbi-x * {
  font-family: Arial, 'Helvetica Neue', Helvetica, system-ui, sans-serif !important;
  letter-spacing: normal !important;
}

/* stop animations (explicit choice, or the OS setting) */
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
