/* A slim strip on the bottom edge: it never covers the opening buttons. */
.hs-consent {
  position: fixed;
  z-index: 110;
  inset-inline: 0;
  bottom: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 12px max(4vw, 16px) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--deep, #1e2150);
  background: var(--paper, #f3f2ee);
  /* Fine print, not a headline: small and quiet (owner, 24.11.2026). 5.9:1 on paper. */
  color: var(--fine-print, #575a7b);
  font: 400 var(--t-fine, 13px)/1.5 var(--sans, sans-serif);
}

.hs-consent[hidden] {
  display: none;
}

/* Two classes: a host page's own paragraph rule (.doc p on the legal pages) must not
   restyle the fine print. */
.hs-consent .hs-consent-copy {
  flex: 1 1 auto;
  margin: 0;
  max-width: 132ch;
  color: inherit;
  font: inherit;
}

/* The title names the dialog for assistive technology; it is not set apart visually. */
.hs-consent strong {
  font-weight: inherit;
}

.hs-consent .hs-consent-copy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hs-consent-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

/* Both answers carry the same weight: same box, same ink, same size. Neither is filled. */
.hs-consent-actions button {
  min-width: 104px;
  min-height: 44px;
  padding: 6px 18px;
  border: 1px solid var(--deep, #1e2150);
  border-radius: 3px;
  background: transparent;
  color: var(--deep, #1e2150);
  font: 500 15px/1.4 var(--sans, sans-serif);
  cursor: pointer;
}

.hs-consent-actions button:hover {
  background: var(--lilac, #cacdea);
  color: var(--deep, #1e2150);
}

@media (max-width: 720px) {
  .hs-consent { flex-direction: column; align-items: stretch; gap: 10px; }
  .hs-consent-actions button { flex: 1; }
}

/* Phones: where a page has a consent slot, the strip is a real row in the page and
   never covers copy (consent.mjs mounts it there). */
@media (max-width: 720px), (max-height: 540px) {
  [data-mobile-consent-slot] .hs-consent { position: static; padding: 16px 24px; border-block: 1px solid var(--deep, #1e2150); }
}
/* A first visit on a phone: the row's place is kept before the script adds the strip, so
   the page below it does not jump (js/indigo/consent-reserve.js marks the first visit;
   four lines of fine print, two buttons, the row's own padding). */
@media (max-width: 720px), (max-height: 540px) {
  html[data-consent="pending"] [data-mobile-consent-slot]:empty { min-height: 166px; }
}
@media (max-width: 370px) {
  html[data-consent="pending"] [data-mobile-consent-slot]:empty { min-height: 186px; }
}
/* Homepage: the strip is a row between the opening film and services on every width. */
[data-consent-flow="always"] .hs-consent { position: static; border-block: 1px solid var(--deep, #1e2150); }

/* A focused control never hides under the fixed strip (WCAG 2.4.11): scrolling to a
   focused element leaves room for the strip (--consent-h is 0 when it is closed). */
html {
  scroll-padding-block-end: calc(var(--consent-h, 0px) + 16px);
}

/* Floating tools that would cover text step aside, on every page. Only
   js/indigo/mobile-tools.mjs sets this, and only up to tablet width. The module holds each
   change for 250ms; here the change is a short fade, never a blink (owner, 23.11.2026).
   Visibility flips after the fade out and before the fade in, so a hidden tool is never
   focusable or tappable. The first reading on a page is not a change and does not fade
   (data-mobile-settled arrives with the second reading). */
[data-mobile-obscured="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
[data-mobile-settled][data-mobile-obscured] {
  transition: opacity .2s ease, visibility 0s linear 0s;
}
[data-mobile-settled][data-mobile-obscured="true"] {
  transition: opacity .2s ease, visibility 0s linear .2s;
}
:is(.motion-off, .a11y-nomotion) [data-mobile-settled][data-mobile-obscured] { transition: none; }
@media (prefers-reduced-motion: reduce) {
  [data-mobile-settled][data-mobile-obscured] { transition: none; }
}

/* The fixed strip never covers the end of the page: the body keeps its height free below
   the footer (0 while the strip is closed or sits in the page flow). */
body.has-consent-banner { padding-bottom: var(--consent-h, 0px); }

/* Floating tools stay clear of the strip while it is open. */
body.has-consent-banner .wa-float,
body.has-consent-banner .a11y-btn {
  margin-bottom: var(--consent-h, 0px);
}

.hs-consent:focus-visible,
.hs-consent button:focus-visible,
footer [data-consent-open]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Inherit the existing footer's type, color, spacing and navigation layout. */
footer [data-consent-open] {
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

footer [data-consent-open]:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .hs-consent,
  .hs-consent * {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}
