/* home UX pass 2026-11-16 — compact Klaro consent notice (audit items 5 and 6).
   Layout only: the words, the three choices and the consent logic are Klaro's
   and stay as they are. Loaded after klaro.css and chat-facade.css.

   The notice's own block: text plus "Let me choose", "Decline", "Accept all".
   .cn-ok and .cn-buttons become display:contents, so the four pieces sit in
   one grid and can share a row with the text where the width allows. */

:root { --wub-cn-reserve: 0px; }

.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  grid-template-areas: "text learn decline accept";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 4px 12px 4px 16px;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body p {
  grid-area: text;
  margin: 0;
  font-size: 12px;
  line-height: 15px;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok,
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons {
  display: contents;
}
/* All three controls: a hit area at least 44 px tall, 8 px apart (column-gap). */
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok a.cn-learn-more,
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok .cn-buttons button.cm-btn {
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-learn-more {
  grid-area: learn;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-grow: 0;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons button.cm-btn {
  width: auto;
  padding: 0 14px;
}
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-decline { grid-area: decline; }
.klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cm-btn-success { grid-area: accept; }

/* Phones (up to 559 px): text on top, the three controls in one row below. */
@media (max-width: 559px) {
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "text text text" "learn decline accept";
    padding: 5px 10px 2px;
    row-gap: 1px;
  }
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body p { line-height: 14px; }
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-learn-more { justify-self: start; }
}
@media (max-width: 374px) {
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons button.cm-btn { padding: 0 12px; }
}

/* Desktop (1024 px and up): Klaro floats the notice bottom-left. One row,
   wider but much shorter, so it covers less of the service cards. */
@media (min-width: 1024px) {
  /* Fix round 2026-11-16: the notice stays in the left gutter beside the
     centered hero content. Its right edge stops 16 px left of the hero button
     (356 px wide, centered), so 50vw - 178 - 16 - 20 (left inset) = 50vw - 214 wide.
     600 px at 1628 px and wider; 298 px at 1024. */
  .klaro .cookie-notice:not(.cookie-modal-notice) {
    --notice-max-width: min(600px, calc(50vw - 214px));
    --notice-bottom: 16px;
    container-type: inline-size;
  }
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body { padding: 8px 12px 8px 16px; }
}
/* A narrow desktop notice: text on top, the three controls in one row below. */
@container (max-width: 559px) {
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    grid-template-columns: auto auto 1fr;
    grid-template-areas: "text text text" "learn decline accept";
    row-gap: 4px;
    padding: 8px 10px 8px 12px;
  }
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cm-btn-success { justify-self: start; }
}
@container (max-width: 359px) {
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-learn-more { padding: 0 4px; }
  .klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons button.cm-btn { padding: 0 10px; }
}

/* Reserve room while the notice shows, so it never covers the page's last
   content, and so keyboard focus scrolls clear of it. The values match the
   measured notice height at each width, plus a little slack. */
:root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) {
  --wub-cn-reserve: 60px;
  scroll-padding-bottom: calc(var(--wub-cn-reserve) + 8px);
}
@media (max-width: 559px) {
  :root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) { --wub-cn-reserve: 88px; }
}
@media (max-width: 374px) {
  :root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) { --wub-cn-reserve: 104px; }
}
@media (min-width: 1024px) {
  :root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) { --wub-cn-reserve: 84px; }
}
/* Below 1548 px the desktop notice is narrower than 560 px and takes two rows
   (94 px tall from 1280, 109 px at 1024), plus its 16 px inset. */
@media (min-width: 1024px) and (max-width: 1547px) {
  :root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) { --wub-cn-reserve: 118px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  :root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) { --wub-cn-reserve: 134px; }
}
body:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) {
  padding-bottom: var(--wub-cn-reserve);
}

/* The round chat button (chat-facade.css, not this file) sits in the same
   bottom-right corner as the full-width notice below 1024 px. While the notice
   shows, lift the button just above it. On desktop the notice is bottom-left,
   so the button stays put. */
@media (max-width: 1023px) {
  body:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) .wub-chat-facade {
    bottom: calc(var(--wub-cn-reserve) + 8px);
  }
}

/* Polish round 2026-11-16: the 60 px round chat button (bottom 20 px, right 20 px) covered the right end of
   a focused item near the bottom of the screen. Keyboard focus now stops clear of it: 20 + 60 + 8 px with no
   notice. Below 1024 px the button rides above the notice (reserve + 8 px), so focus stops above the button.
   From 1024 px the notice sits bottom-left and its reserve is already taller than the button. */
html { scroll-padding-bottom: 88px; }
@media (max-width: 1023px) {
  :root:has(.klaro .cookie-notice:not(.cookie-modal-notice):not(.cookie-notice-hidden)) {
    scroll-padding-bottom: calc(var(--wub-cn-reserve) + 8px + 60px + 8px);
  }
}
