/* =========================================================
   GlobeWarn — dock.css

   One row along the bottom edge, centred. Two pills sit side by side; one
   pill sits alone in the middle. The centring is not calculated anywhere —
   it falls out of a flex row with justify-content: center, so removing a
   pill re-centres the other with no code involved.

   Flush with the edge, as asked: zero offset, zero margin, padding only the
   amount that keeps a border off the letters.
   ========================================================= */

#gw-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 800;                 /* under the pricing pop-up at 900 */

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.35rem;

  margin: 0;
  /* The horizontal padding is set by the script, which measures what is
     beside the row and keeps clear of it. Only the safe-area inset is
     declared here, as the floor those measurements sit on. */
  padding: 0 0 env(safe-area-inset-bottom);
  padding-inline-start: max(0px, env(safe-area-inset-left));
  padding-inline-end: max(0px, env(safe-area-inset-right));
  pointer-events: none;         /* the strip is not a target; the pills are */
}

#gw-dock > * { pointer-events: auto; }

.gw-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: calc(100vw - 1rem);
  margin: 0;
  padding: 0.42rem 0.8rem;

  font-size: 0.88rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;

  border: 1px solid var(--line, #c9d2dc);
  border-radius: 999px 999px 0 0;
  border-bottom: 0;
  background: var(--panel, #fff);
  color: var(--text-dim, #55606d);
  box-shadow: 0 -2px 10px rgba(12, 18, 26, 0.12);
}

/* The no-cookies pill states a fact. Its only control is the close, which
   sits inside the pill rather than beside it, so the two read as one thing:
   a sentence and the way to be done with it. */
.gw-pill--stated { cursor: default; padding-right: 0.35rem; }

.gw-pill-said { white-space: normal; }

.gw-pill-close {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  margin-inline-start: 0.1rem;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  color: var(--ink-faint, #6b7683);
  cursor: pointer;
}

.gw-pill-close:hover {
  border-color: var(--line, #c9d2dc);
  color: var(--ink, inherit);
}

.gw-pill-close:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 1px;
}

.gw-pill-text { white-space: nowrap; }

.gw-pill-btn {
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong, #8c99a8);
  background: var(--bg, #fff);
  color: inherit;
  cursor: pointer;
}

.gw-pill-btn:hover { border-color: var(--accent, #D9480F); }

/* The answer already given, if the reader comes back to it. */
.gw-pill-btn.is-on {
  border-color: var(--accent, #D9480F);
  color: var(--ink, inherit);
}

.gw-pill-btn:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 2px;
}

/* Room at the end of the page, exactly what the dock covers. */
body.gw-dock-showing {
  /* Exactly what the dock covers, including any lift the script applied, so
     the last line of the page can always be scrolled clear of it. */
  padding-bottom: var(--gw-dock-room, 2.4rem);
}

/* Running as the installed app the dock still applies: a cookie statement is
   as true in the app as on the web. Only the install pill removes itself. */
