/* den-ui: the working pop-up's look (busy.js). Tokens only (UK-1): no
   colour of its own. Linked, never injected: clean under style-src 'self'. */
/* Issue 673: the pop-up's buttons are the kit's one button (button.css).
   The page links button.css itself (Den: on every page, KIT_PAGE_CSS),
   never an @import here: that would ask for it by a second URL (issue
   231). */
.bz-dlg {
  font-family: var(--sans);
  position: fixed;
  inset-block: auto;
  inset-inline: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 auto;
  height: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  width: min(420px, calc(100vw - 32px));
  max-width: 100%;
  padding: 0;
  border: 1px var(--edge-style, solid) var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-dialog);
}
.bz-dlg::backdrop {
  background: color-mix(in srgb, var(--sunken) 70%, transparent);
}
.bz-b {
  padding: var(--space-4) calc(var(--space-4) + 2px);
  display: grid;
  gap: 10px;
}
.bz-b h2 {
  font-size: var(--fs-l);
  margin: 0;
  outline: none;
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.bz-b p {
  margin: 0;
  font-size: var(--fs-s);
  line-height: 1.5;
}
.bz-ico {
  width: 18px;
  height: 18px;
  flex: none;
}
.bz-ok {
  color: var(--ok);
}
.bz-bad {
  color: var(--bad);
}
.bz-dlg[data-state="noanswer"] .bz-clock {
  color: var(--warn);
}
.bz-bar {
  height: 2px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.bz-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: var(--accent);
  animation: bz-ind 1.4s ease-in-out infinite;
}
@keyframes bz-ind {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bz-bar i {
    animation: none;
    width: 100%;
    opacity: 0.7;
  }
}
.bz-b details {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.bz-b pre {
  margin: 6px 0 0;
  font: 11.5px/1.5 var(--mono);
  background: var(--sunken);
  padding: var(--space-2);
  border-radius: var(--radius-button);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bz-ft {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  align-items: center;
}
/* The footer's size only: the look is .den-btn's (issue 673). */
.bz-btn {
  font-size: var(--fs-s);
  min-height: var(--tap-min);
  padding: 0 var(--space-3);
}
@media (max-width: 480px) {
  .bz-btn {
    min-height: var(--tap);
  }
  .bz-ft .bz-primary {
    flex-basis: 100%;
    order: 9;
  }
}
.bz-prog {
  margin: 0;
  padding-inline-start: 1.25em;
  font-size: var(--fs-s);
  line-height: 1.5;
  color: var(--muted);
}
.bz-prog li:last-child {
  color: var(--text);
}
.bz-next {
  font-weight: 500;
}

/* issue 699: the held button. busy.js's hold() sets aria-disabled
   (issue 1434: not disabled, so it keeps focus) and aria-busy, wraps the label in .bz-lbl and adds three dots. The label is
   hidden, not removed, so the button keeps its size; the dots take the
   label's colour (currentColor). Tokens only: no colour of its own. */
[aria-busy="true"]:is(button, .btn, a) {
  position: relative;
  cursor: progress;
}
[aria-busy="true"] > .bz-lbl {
  visibility: hidden;
}
[aria-busy="true"] > .bz-dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
/* Issue 1054: a row's dots sit at its end, its words still shown. */
[aria-busy="true"] > .bz-dots.bz-row {
  position: static;
  inset: auto;
  display: inline-flex;
  margin-inline-start: auto;
  padding-inline: var(--space-2);
}
.bz-dots > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: bz-dot 1.2s ease-in-out infinite;
}
.bz-dots > i:nth-child(2) {
  animation-delay: 0.16s;
}
.bz-dots > i:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes bz-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bz-dots > i {
    animation: none;
    opacity: 0.75;
    transform: none;
  }
}
/* Held is not "off": it keeps its own colours (over the kit button's own
   disabled look, whichever stylesheet comes first). */
[aria-busy="true"]:disabled,
.den-btn[aria-busy="true"]:disabled,
[aria-busy="true"][aria-disabled="true"],
.den-btn[aria-busy="true"][aria-disabled="true"] {
  opacity: 1;
}
