/* The demo's own chrome: a small badge saying what this is, and a toast for
   clicks a static copy cannot perform. The badge sits in the empty right end of
   the console's own footer strip, so it covers no content. Colours are literal
   on purpose: the console's tokens are not this file's to depend on. They are
   the site's navy brand (design/BRAND_TOKENS.md): navy #021639, navy 800
   #0b2550, mist #b8c6e0, label #8a9bbf, the accent #1f5fff and, on navy,
   #6d97ff. */
.demo-chrome {
  position: fixed;
  right: 16px;
  bottom: 6px;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 4px 5px 4px 12px;
  border-radius: 999px;
  background: #021639;
  color: #b8c6e0;
  font: 500 12.5px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 8px 28px -8px rgba(2, 22, 57, 0.45);
}
.demo-chrome strong { color: #fff; font-weight: 600; }
.demo-chrome-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.demo-chrome-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-chrome-link {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
}
.demo-chrome-link:hover { background: rgba(255, 255, 255, 0.18); }
.demo-chrome-link:focus-visible { outline: 2px solid #6d97ff; outline-offset: 2px; }

[data-demo-row-link], [data-demo-href]:not(button):not(a) { cursor: pointer; }
/* Folded rows and closed disclosures (demo.js): the console gives rows and
   panels an explicit display, which outranks the browser's own [hidden] rule. */
[data-demo-folded][hidden], [data-demo-region][hidden] { display: none !important; }
#package-actions-list[hidden] { display: none !important; }

/* demo.js filters palette rows with the hidden attribute; the console gives
   rows and groups an explicit display, which outranks the browser's own
   [hidden] rule. */
.wep-cmdk [hidden] { display: none !important; }

.demo-toast {
  position: fixed;
  right: 16px;
  bottom: 52px;
  z-index: 2147483000;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #021639;
  border: 2px solid #021639;
  font: 400 13.5px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 10px 30px -10px rgba(2, 22, 57, 0.3);
}
.demo-toast[hidden] { display: none; }

/* The guided tour's panel: one stop per page, bottom left, clear of the badge.
   It sits over the console's navy sidebar and its light content alike, so it is
   a white card with a navy edge: the fill stands 17.9:1 off the sidebar and the
   border 16.7:1 off the content, past WCAG 2.2's 3:1 for a component's edge
   (SC 1.4.11). A navy panel read 1.04:1 against the sidebar and vanished into
   it. Text is 6.8:1 or more (SC 1.4.3 asks 4.5:1); controls and focus rings 5:1
   or more. */
.demo-guide {
  position: fixed;
  left: 16px;
  bottom: 52px;
  z-index: 2147483000;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 16px 12px;
  border: 2px solid #021639;
  border-radius: 12px;
  background: #fff;
  color: #26365a;
  font: 400 13.5px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 18px 44px -12px rgba(2, 22, 57, 0.55);
}
.demo-guide-step {
  font: 500 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.04em;
  color: #4b5b7c;
}
.demo-guide-title {
  margin: 6px 0 4px;
  color: #021639;
  font: 600 15.5px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.demo-guide-body { margin: 0; }
.demo-guide-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.demo-guide-nav button {
  white-space: nowrap;
  padding: 5px 12px;
  border: 0;
  border-radius: 7px;
  font: 500 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}
.demo-guide-quiet { background: #fff; color: #021639; box-shadow: inset 0 0 0 1px #5b6b8c; }
.demo-guide-quiet:hover { background: #eef1f7; }
.demo-guide-primary { background: #021639; color: #fff; }
.demo-guide-primary:hover { background: #0b2550; }
.demo-guide-nav button:focus-visible { outline: 2px solid #1f5fff; outline-offset: 2px; }
/* demo.js puts the card on the right when its element leaves only that side
   clear, or when the stop asks for it. */
.demo-guide.demo-guide-right { left: auto; right: 16px; }
/* --demo-k is 1 on a desktop; on a phone demo.js sets it to undo the page's
   shrink, so the outline stays visible. */
.demo-guide-focus {
  outline: calc(2px * var(--demo-k, 1)) solid #1f5fff;
  outline-offset: calc(4px * var(--demo-k, 1));
  border-radius: 6px;
}

@media (max-width: 640px) {
  .demo-chrome-text { display: none; }
  .demo-guide { bottom: 56px; }
}

/* A phone (demo.js adds .demo-pinned): the badge, card and note are drawn at
   the screen's scale and pinned to the part of the page in view, so the badge
   gets the screen's width and wraps instead of cutting its text. */
.demo-pinned .demo-chrome { flex-wrap: wrap; border-radius: 14px; padding: 6px 8px 6px 12px; }
.demo-pinned .demo-chrome-text { display: block; flex: 1 1 calc(100% - 24px); white-space: normal; }
/* While the guide's card is open it says what this is, so the badge keeps only
   its links and the two together leave more of the screen to the page. */
.demo-pinned:has(.demo-guide) .demo-chrome { flex-wrap: nowrap; justify-content: flex-end; }
.demo-pinned:has(.demo-guide) .demo-chrome-text { display: none; }
