/* THE HEADER SEARCH (⌘K), VIDURA (the console counsellor) and ENDPOINTS & URLS — BrainTrust's own, signed-in only.
   Every colour is a token from css/tuhi-shell.css (html.tuhi / html.tuhi.light), so both themes follow. */

/* ── header buttons ─────────────────────────────────────────────────────────────────────────────────────────────── */
.bt-search-btn{ display:inline-flex; align-items:center; gap:8px; height:34px; padding:0 8px 0 10px; min-width:210px; border-radius:9px;
  border:1px solid var(--bd-strong); background:var(--surface-2); color:var(--mut); font:inherit; font-size:13px; cursor:pointer; }
.bt-search-btn:hover{ border-color:var(--acc); color:var(--fg-2); }
.bt-search-btn .bt-search-lbl{ flex:1; text-align:left; }
.bt-kbd{ display:inline-flex; align-items:center; height:20px; padding:0 6px; border-radius:5px; border:1px solid var(--bd); background:var(--surface);
  color:var(--mut); font:600 11px/1 Inter,system-ui,sans-serif; letter-spacing:.02em; }
.bt-vidura-btn{ display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 12px; border-radius:9px; border:1px solid var(--acc-ring);
  background:var(--acc-soft); color:var(--acc-fg); font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
.bt-vidura-btn:hover{ border-color:var(--acc); }
@media (max-width:1180px){ .bt-search-btn{ min-width:0; } .bt-search-btn .bt-search-lbl, .bt-search-btn .bt-kbd{ display:none; } .bt-vidura-btn .bt-vtxt{ display:none; } }

/* ── the palette ────────────────────────────────────────────────────────────────────────────────────────────────── */
.bt-pal-scrim{ position:fixed; inset:0; z-index:400; background:rgba(8,12,22,.55); display:flex; align-items:flex-start; justify-content:center; padding:10vh 16px 16px; }
html.tuhi.light .bt-pal-scrim{ background:rgba(23,32,51,.28); }
.bt-pal{ width:min(640px,100%); max-height:72vh; display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--bd-strong);
  border-radius:14px; box-shadow:var(--shadow-md); overflow:hidden; }
.bt-pal-in{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--bd); color:var(--mut); }
.bt-pal-in input{ flex:1; min-width:0; height:30px; border:0 !important; outline:0; background:transparent !important; color:var(--fg); font:inherit; font-size:15px; box-shadow:none !important; padding:0; }
.bt-pal-list{ overflow-y:auto; padding:6px; margin:0; list-style:none; }
.bt-pal-grp{ padding:10px 10px 4px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--mut); }
.bt-pal-item{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:9px; cursor:pointer; color:var(--fg); }
.bt-pal-item .ico{ color:var(--mut); flex:none; }
.bt-pal-item[aria-selected="true"]{ background:var(--acc-soft); }
.bt-pal-item[aria-selected="true"] .ico{ color:var(--acc-fg); }
.bt-pal-t{ display:flex; flex-direction:column; min-width:0; flex:1; }
.bt-pal-t b{ font-weight:600; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bt-pal-t small{ color:var(--mut); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bt-pal-k{ flex:none; font-size:11px; color:var(--mut); border:1px solid var(--bd); border-radius:99px; padding:1px 8px; }
.bt-pal-empty{ padding:18px 14px; color:var(--mut); font-size:13px; }
.bt-pal-foot{ display:flex; gap:14px; flex-wrap:wrap; padding:8px 14px; border-top:1px solid var(--bd); color:var(--mut); font-size:11.5px; }
.bt-pal-foot span{ display:inline-flex; gap:5px; align-items:center; }

/* ── Vidura ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
.vd-fab{ position:fixed; right:20px; bottom:20px; z-index:300; display:inline-flex; align-items:center; gap:8px; height:46px; padding:0 18px 0 14px; border-radius:99px;
  border:1px solid var(--acc); background:var(--acc); color:var(--on-acc); font:600 14px Inter,system-ui,sans-serif; box-shadow:var(--shadow-md); cursor:pointer; }
.vd-fab:hover{ background:var(--acc-hover); }
.vd-fab[hidden]{ display:none !important; }
.vd-panel{ position:fixed; top:0; right:0; bottom:0; z-index:350; width:min(420px,100vw); display:flex; flex-direction:column; background:var(--surface);
  border-left:1px solid var(--bd-strong); box-shadow:var(--shadow-md); transform:translateX(105%); transition:transform .22s ease; visibility:hidden; }
.vd-panel.open{ transform:none; visibility:visible; }
@media (prefers-reduced-motion:reduce){ .vd-panel{ transition:none; } }
.vd-head{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--bd); }
.vd-mark{ width:34px; height:34px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; background:var(--vio-bg); color:var(--vio); flex:none; }
.vd-who{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.2; }
.vd-who b{ font-size:15px; color:var(--fg); }
.vd-who small{ font-size:11.5px; color:var(--mut); }
.vd-x{ width:32px; height:32px; border-radius:8px; border:1px solid transparent; background:none; color:var(--fg-2); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.vd-x:hover{ background:var(--surface-3); }
.vd-note{ padding:7px 14px; font-size:11.5px; color:var(--mut); border-bottom:1px solid var(--bd-soft); background:var(--surface-2); }
.vd-log{ flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
.vd-msg{ max-width:92%; padding:9px 12px; border-radius:12px; font-size:13.5px; line-height:1.5; white-space:pre-wrap; word-wrap:break-word; }
.vd-msg.me{ align-self:flex-end; background:var(--acc-soft); color:var(--fg); border:1px solid var(--acc-ring); }
.vd-msg.vd{ align-self:flex-start; background:var(--surface-2); color:var(--fg); border:1px solid var(--bd); }
.vd-msg.err{ border-color:var(--err-bd); color:var(--err-fg); }
.vd-step{ align-self:flex-start; display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--mut); }
.vd-step.ok::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--ok); }
.vd-step.run::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--warn); animation:vdpulse 1s infinite alternate; }
.vd-step.bad::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--err); }
@keyframes vdpulse{ to{ opacity:.35; } }
.vd-cards{ display:flex; flex-direction:column; gap:6px; align-self:stretch; }
.vd-card{ display:flex; flex-direction:column; gap:2px; text-align:left; padding:8px 11px; border-radius:10px; border:1px solid var(--bd); background:var(--surface); color:var(--fg); cursor:pointer; font:inherit; }
.vd-card:hover{ border-color:var(--acc); }
.vd-card b{ font-size:13px; font-weight:600; }
.vd-card small{ font-size:11.5px; color:var(--mut); overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.vd-chips{ display:flex; flex-wrap:wrap; gap:6px; padding:0 14px 10px; }
.vd-chip{ height:28px; padding:0 11px; border-radius:99px; border:1px solid var(--bd-strong); background:var(--surface); color:var(--fg-2); font:inherit; font-size:12px; cursor:pointer; }
.vd-chip:hover{ border-color:var(--acc); color:var(--fg); }
.vd-form{ display:flex; gap:8px; padding:10px 14px 14px; border-top:1px solid var(--bd); }
.vd-form textarea{ flex:1; min-width:0; resize:none; height:42px; max-height:140px; border-radius:10px; padding:10px 12px; font:inherit; font-size:13.5px; line-height:1.4; }
.vd-send{ flex:none; height:42px; padding:0 14px; border-radius:10px; border:1px solid var(--acc); background:var(--acc); color:var(--on-acc); font:600 13px Inter,system-ui,sans-serif; cursor:pointer; }
.vd-send[disabled]{ opacity:.55; cursor:default; }

/* ── Endpoints & URLs ───────────────────────────────────────────────────────────────────────────────────────────── */
.ux-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--mut); flex:none; vertical-align:middle; }
.ux-dot.s-up, .ux-dot.s-bound{ background:var(--ok); box-shadow:0 0 0 3px var(--ok-bg); }
.ux-dot.s-down, .ux-dot.s-unbound{ background:var(--err); box-shadow:0 0 0 3px var(--err-bg); }
.ux-dot.s-planned, .ux-dot.s-unknown{ background:var(--warn); box-shadow:0 0 0 3px var(--warn-bg); }
.ux-dot.s-not-probed{ background:var(--bd-strong); }
.ux-url{ min-width:230px; font:500 12.5px ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--fg); word-break:break-all; }
.ux-url a{ color:var(--acc-fg) !important; }
.ux-st{ display:inline-flex; align-items:center; gap:7px; white-space:nowrap; font-size:12px; color:var(--fg-2); }
.ux-st small{ color:var(--mut); }
.ux-copy{ white-space:nowrap; padding:3px 9px !important; font-size:11.5px !important; }
.ux-owner{ white-space:nowrap; }
.ux-legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--mut); }
.ux-legend span{ display:inline-flex; align-items:center; gap:6px; }
.ux-purpose{ color:var(--fg-2); font-size:12.5px; line-height:1.45; }
.ux-purpose small{ display:block; color:var(--mut); font-size:11.5px; margin-top:2px; }
