/* Top bar groups (TRANSPORT | AI | SYSTEM), inline SVG icons, minimum hit size. Loaded after the wave CSS. */

/* ---------- minimum hit size for live use (B3) ---------- */
/* :not([hidden]) raises specificity above single-class rules such as .strip-btn { min-height: 22px } */
button:not([hidden]) { min-height: 32px; min-width: 32px; }
button[id^="hw-bank-"]:not([hidden]) { min-width: 44px; min-height: 32px; }

/* ---------- inline SVG icons (B6) ---------- */
.ic { width: 12px; height: 12px; fill: currentColor; flex: 0 0 auto; margin-right: 5px; vertical-align: -1px; }
.ic.tb-chev { margin: 0 0 0 5px; width: 10px; height: 10px; }

/* ---------- top bar layout ---------- */
header.status-bar { gap: 10px; }
header.status-bar button, header.status-bar .tb-pill { white-space: nowrap; }
.tb-group { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tb-transport .bpm-box { padding: 0 8px; }
.tb-transport > button { padding: 0 12px; font: 800 10px var(--font-mono); }
.header-actions { flex-shrink: 0; }
.brand-subtitle { display: none; }
@media (min-width: 1500px) { .brand-subtitle { display: inline; } }
.status-hud-banner { min-width: 0; flex: 1 1 120px; }

.tb-pill {
  font: 800 9px var(--font-mono); letter-spacing: 0.5px; padding: 6px 9px;
  border: 1px solid var(--line-bright); background: var(--bg-surface-2); color: var(--text-muted);
}
.tb-pill.online { color: var(--acid); border-color: var(--acid); }
.tb-sample-btn, .tb-menu-btn {
  font: 800 10px var(--font-mono); letter-spacing: 0.5px; padding: 0 10px;
  border: 1px solid var(--line-bright); background: var(--bg-surface-2); color: var(--text-main); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-menu.open .tb-menu-btn { border-color: var(--acid); color: var(--acid); }

/* ---------- dropdown menus ---------- */
.tb-menu { position: relative; }
.tb-panel {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 9500; min-width: 230px;
  display: flex; flex-direction: column; gap: 4px; padding: 6px;
  background: var(--bg-surface-2); border: 1px solid var(--line-bright); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.tb-panel[hidden] { display: none; }
.tb-panel button { width: 100%; justify-content: flex-start; text-align: left; display: flex; align-items: center; }

/* ---------- Mixxx popover: [hidden] must win over its inline display:flex; hint never blocks clicks (A7) ---------- */
#mixxx-popover[hidden] { display: none !important; }
#mixxx-hint { pointer-events: none; }

/* ---------- fit: the header must never widen the grid (it used to push the page past the viewport) ---------- */
.app-root { grid-template-columns: minmax(0, 1fr); }
header.status-bar { min-width: 0; padding: 0 10px; gap: 8px; }
.brand-group, .tb-group, .header-actions { flex-shrink: 0; }
.status-hud-banner { max-width: none; padding: 0 8px; min-height: 32px; }
.badge-entitlement, .badge-cue { white-space: nowrap; }
.bar-counter { white-space: nowrap; padding: 3px 6px; }
.tb-transport .bpm-sub { display: none; }
@media (min-width: 1700px) { .tb-transport .bpm-sub { display: flex; } }
@media (max-width: 1500px) { #cue-route-badge { display: none; } }
@media (max-width: 1300px) {
  .brand-logo span { display: none; }
  .brand-logo { letter-spacing: 1px; }
  #entitlement-badge { padding: 5px 6px; }
  .tb-sample-btn, .tb-menu-btn { padding: 0 7px; }
}

/* ---------- compact header widgets ---------- */
.brand-logo { white-space: nowrap; font-size: 12px; letter-spacing: 1.5px; }
.tb-transport #mk-lock { padding: 0 10px; font-size: 10px; letter-spacing: 1px; min-height: 32px; height: 32px; }
.tb-transport > button { height: 32px; }
.tb-pill { padding: 0 7px; font-size: 8px; display: inline-flex; align-items: center; min-height: 32px; }
.badge-entitlement { padding: 0 7px; min-height: 32px; }
.tb-transport .phase-ctl span:first-child { display: none; }
@media (max-width: 1300px) {
  .tb-lbl { display: none; }
  #btn-panic-restore .ic { margin-right: 0; }
  .badge-entitlement { font-size: 8px; padding: 0 5px; }
  .bar-counter { font-size: 10px; padding: 3px 4px; }
  .tb-transport .bpm-box { gap: 4px; padding: 0 4px; }
  .phase-ctl { gap: 2px; }
  .header-actions, .tb-group { gap: 4px; }
}

/* 32 px buttons made the preset/master rows taller: let the kick waveform give the height back. */
#pane-kick .canvas-container { height: clamp(40px, 7.5dvh, 100px) !important; }
@media (max-height: 860px) {
  #pane-kick .canvas-container { height: 38px !important; }
  #pane-kick { gap: 4px; }
  #pane-kick .param-knob-matrix { gap: 4px; }
}
