/* The cookie banner (#389, #1698): one markup, each world's own ground, hairline and buttons. Fixed to the bottom of
   the screen on every theme and size, in the document before the header so it is still the keyboard's next stop. The
   header, with the call button and the navigation, is at the top and stays clear. `--cookie-banner-h` is the banner's
   height while it shows, else 0: the island measures it, and without scripting the banner holds a fixed one. The page
   pads its end by it, a focus scrolls clear of it, and Showroom's sticky phone reach bar sits above it. */
:root { --cookie-banner-h: 0px; }
html { scroll-padding-bottom: var(--cookie-banner-h); }
body { padding-bottom: var(--cookie-banner-h); }
.cookie-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  box-sizing: border-box;
  background: var(--surface, var(--paper));
  color: var(--ink);
  border-top: 1px solid var(--line, var(--rule));
  padding-bottom: env(safe-area-inset-bottom);
}
.cookie-banner[hidden] { display: none; }
/* Without scripting, nothing can tell whether the visitor has answered, so the banner shows and its buttons post. */
@media (scripting: none) {
  .cookie-banner[hidden] { display: block; }
  /* Nothing can measure it, so it holds one height, big enough for its text, and the page pads by the same. */
  :root { --cookie-banner-h: 13rem; }
  .cookie-banner { height: var(--cookie-banner-h); overflow: auto; display: grid; align-content: center; }
}
/* A visitor without JavaScript who has answered gets `/bg/banner.css`'s rule, which hides it again (`src/banner.ts`). */
.cookie-banner__row { display: grid; gap: 12px; padding-block: 16px; }
.cookie-banner__text { margin: 0; max-width: 65ch; font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.cookie-banner__text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cookie-banner__actions button { width: 100%; min-width: 0; padding-inline: 12px; white-space: normal; text-align: center; }
@media (min-width: 760px) {
  .cookie-banner__row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; }
  .cookie-banner__actions { display: flex; }
  .cookie-banner__actions button { width: auto; padding-inline: 24px; }
}
@media (scripting: none) and (min-width: 760px) { :root { --cookie-banner-h: 6rem; } }
