/* panel-status-bar.css — the header's status bar (panel-status-bar.js): the
   spinner at all times and one line for what Parallax is doing; a click opens
   the thought process in a glass popup (.px-sb-pop, a `float` in
   glass-surface.js). The spinner is the ordinary .pulse-dot, upgraded by orb.js. */
.px-sb { align-items: center; }
.px-sb-btn {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
  height: var(--ctl-h, 28px); padding: 0 12px 0 8px;
  border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--t-secondary); cursor: pointer;
  font: 400 var(--fs-sm)/1 var(--sans);
}
/* Hover and selected are the rail's (glass-surface.css, .px-sb-btn); only the text moves here. */
.px-sb-btn:hover, .px-sb-btn[aria-expanded="true"] { color: var(--bone); }
.px-sb-btn:not(.glass-surface):hover { background: var(--s-quiet); }
.px-sb-btn:focus-visible { outline: 1px solid var(--rim); outline-offset: 2px; }
.px-sb-btn .pulse-dot { flex: none; }
.px-sb .px-sb-state { flex: none; color: inherit; white-space: nowrap; }
.px-sb-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t-faint); }
.px-sb-detail[hidden] { display: none; }
/* Asleep and idle are quieter than a bar that is working. */
.px-sb-btn[data-mode="asleep"], .px-sb-btn[data-mode="idle"] { color: var(--t-faint); }
.px-sb-btn[data-mode="asleep"] .pulse-dot, .px-sb-btn[data-mode="idle"] .pulse-dot { opacity: .55; }
.main-top:has(.px-progress-pill) .px-sb { min-width: 0; }

/* The popup: what it thought and did, newest at the bottom. */
.px-sb-pop {
  position: fixed; z-index: 60; max-height: min(60vh, 460px);
  display: flex; flex-direction: column; box-sizing: border-box;
  padding: 14px 16px 10px; border-radius: var(--r-card, 16px);
  background: var(--s-raise, rgba(30,30,30,.6)); color: var(--t-primary);
}
.px-sb-pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex: none; }
.px-sb-pop-title { font: 400 var(--fs-2xs)/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--t-secondary); }
.px-sb-pop-state { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 var(--fs-sm)/1.2 var(--sans); color: var(--t-meta); }
.px-sb-pop-log { list-style: none; margin: 0; padding: 0 2px 6px 0; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.px-sb-pop-log p { margin: 2px 0 0; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--t-secondary); overflow-wrap: anywhere; }
.px-sb-h { font: 400 var(--fs-2xs)/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--t-faint); padding-top: 4px; }
.px-sb-k { font: 400 var(--fs-2xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--t-faint); }
.px-sb-think.is-open .px-sb-k::after { content: " …"; }
.px-sb-tool, .px-sb-step { display: grid; grid-template-columns: 14px 1fr; column-gap: 6px; align-items: baseline; font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--t-secondary); }
.px-sb-tool p { grid-column: 2; }
.px-sb-mark { color: var(--t-faint); text-align: center; }
.px-sb-tool.is-failed .px-sb-mark { color: var(--t-primary); }
.px-sb-t { overflow-wrap: anywhere; }
.px-sb-empty { font: 400 var(--fs-sm)/1.45 var(--sans); color: var(--t-faint); }

/* THE ROW IS SHARED IN TWO (Godric, 2026-11-23). The chat's name and its ⌄ never
   pass the halfway line; a longer name fades at its edge and slides through on
   hover, as a rail row's does (markScrollFade, panel-sidebar.js). The rest of the
   row, up to the Progress button, is the status bar's: it is given at least that
   half as its basis, so the name can only ever have what is left of the other. */
.main-top .chat-name {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: clip; cursor: default;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--fade-w)), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - var(--fade-w)), transparent 100%);
}
.main-top .chat-name .scroll-text {
  display: inline-block; white-space: nowrap; transform: translateX(0);
  transition: transform var(--scroll-ms, 0ms) linear; transition-delay: 260ms;
}
.main-top .chat-name.is-clipped:hover .scroll-text { transform: translateX(var(--scroll-dist, 0)); }
.main-top .chat-name:not(:hover) .scroll-text { transition-duration: var(--dur-3); transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) { .main-top .chat-name.is-clipped:hover .scroll-text { transform: none; } }
.main-top .chat-menu { flex: none; }
/* Half the row, less the Progress button (30) and the two gaps (11 + 11). */
.main-top .px-sb,
.main-top:has(.px-progress-pill) .px-sb {
  flex: 1 0 calc(50% - 52px); max-width: none; min-width: 0; margin-left: 0; justify-content: center;
}
.px-sb .px-sb-btn { flex: 0 1 auto; }

/* The switch in the popup: Read along on / off. */
.px-sb-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 10px; margin-bottom: 8px; border-bottom: 1px solid var(--hair); flex: none; }
.px-sb-switchrow[hidden] { display: none; }
.px-sb-switch-label { font: 400 var(--fs-sm)/1.3 var(--sans); color: var(--t-primary); }
.px-sb-switch-note { display: block; font: 400 var(--fs-2xs)/1.3 var(--sans); color: var(--t-faint); margin-top: 2px; }
.px-sb-switch {
  position: relative; flex: none; width: 34px; height: 20px; padding: 0; border-radius: 10px;
  border: 1px solid var(--hair); background: var(--s-inter); cursor: pointer;
  transition: background var(--dur-2, .15s) ease;
}
.px-sb-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--t-secondary); transition: transform var(--dur-2, .15s) ease, background var(--dur-2, .15s) ease;
}
.px-sb-switch[aria-checked="true"] { background: var(--bone); border-color: var(--bone); }
.px-sb-switch[aria-checked="true"]::after { transform: translateX(14px); background: var(--ink); }
.px-sb-switch:disabled { opacity: .5; cursor: default; }
.px-sb-switch:focus-visible { outline: 1px solid var(--rim); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .px-sb-switch, .px-sb-switch::after { transition: none; } }
