/* --- segmented control ------------------------------------------------ */

.seg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--chip);
  border-radius: var(--radius);
}

.seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--chip-ink);
  font-size: 14px;
  cursor: pointer;
  box-shadow: none;
}

/* `:not(:disabled)` to outrank the plain button's hover (the accent), which
   would otherwise win by coming later — and paint a segment accent-blue
   under text in the segment's ink (UX-10). */
.seg button:hover:not(:disabled) {
  color: var(--ink);
  background: transparent;
}

.seg button.active,
.seg button.active:hover:not(:disabled) {
  background: var(--seg-on);
  box-shadow: var(--seg-shadow);
  color: var(--ink);
  font-weight: 500;
}

/* The theme switch is icon-only, so its segments stay square. */
.seg.icons button {
  min-width: 38px;
  padding: 0 8px;
}

/* Inside a table row the control gets one narrow column; let it stack rather
   than push the row wider than its track. */
.row .seg {
  flex-wrap: wrap;
}

.row .seg button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}
