/* ============================================================
   Top bar: grouped ⌘K results and the "waiting on you" bell.
   Prefix tbx-. Builds on .ivy-pop / .ivy-palette in ivy-refresh.css;
   colors only from its tokens.
   ============================================================ */

/* ---- palette results ---- */
.tbx-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 4px; font-size: var(--fs-xs); font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.tbx-group-head span {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; text-transform: none;
  padding: 0 6px; border-radius: 999px; background: var(--muted-surface); color: var(--fg-soft);
}
.tbx-opt { min-height: 40px; }
.tbx-opt-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.tbx-opt-label { color: var(--fg); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbx-opt-sub { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbx-more { padding: 2px 10px 6px 36px; font-size: var(--fs-sm); color: var(--muted); }
.tbx-status { padding: 14px 12px; color: var(--muted); font-size: var(--fs-base); }
.tbx-pal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted);
}
.tbx-pal-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.tbx-pal-foot .ivy-kbd { margin: 0 2px 0 6px; }

/* ---- bell ---- */
.tbx-bell { position: relative; cursor: pointer; }
.tbx-bell svg { width: 18px; height: 18px; }
.tbx-bell[aria-expanded="true"] { background: var(--teal-soft); color: var(--teal-deep); }
.tbx-bell-count {
  position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--muted-surface); color: var(--fg-soft);
  border: 1.5px solid var(--card);
  font-size: var(--fs-2xs); font-weight: 700; line-height: 13px; text-align: center; box-sizing: border-box;
}
.tbx-bell.has-new .tbx-bell-count { background: var(--teal); color: var(--card); }
.tbx-bell-count[hidden] { display: none; }

.tbx-bell-pop { width: min(360px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow-y: auto; }
.tbx-bell-row { align-items: flex-start; cursor: pointer; }
.tbx-bell-row .tbx-opt-main { flex: 1; }
.tbx-bell-row .tbx-opt-sub { white-space: normal; }
.tbx-new {
  display: inline-flex; align-items: center; gap: 5px; flex: none; margin-top: 2px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--teal-deep);
}
.tbx-new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

@media (max-width: 720px) {
  .tbx-pal-keys { display: none; }
  /* Phones: the bell is one more icon in the bar, so the icons sit a
     little closer and the building name gives up a few pixels. */
  .topbar .topbar-right { gap: 2px; }
  .topbar .topbar-left { gap: 6px; min-width: 0; }
  .topbar .crumb { min-width: 0; overflow: hidden; }
  .topbar .crumb-section { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .ivy-tb-btn, .topbar .ivy-tb-search, .topbar .ivy-tb-help { width: 34px; }
  .topbar .ivy-tb-building { max-width: 128px; gap: 6px; padding: 0 8px 0 7px; }
}
