/* ==========================================================================
 * vx-seg.css — the site-wide segmented toggle (the look + animation of the Forums "Top / New / My Activity" tabs):
 * a soft grey track with a white pill that slides under the chosen option. No red anywhere.
 * src/js/core/vx-seg.js adds the sliding pill (.vx-seg-thumb) to every tab bar / switch listed in its SEL, and this file styles it.
 * Colours come from tokens.css (--vx-seg-*, dark values in theme.css); the fallbacks keep pages that don't load tokens.css working.
 * The pill-style toggles that already ship their own pill element (pricing, page-heading tab bar, PYPs analyze, charts) use the same tokens.
 * ========================================================================== */
html .vx-seg.vx-seg {
  position: relative; align-items: center; gap: 2px; padding: 4px; box-sizing: border-box; border: 0;
  width: max-content; max-width: 100%; margin-left: 0; margin-right: 0;
  border-radius: 999px; background: var(--vx-seg-track, #ebebee);
  box-shadow: inset 0 0 0 1px var(--vx-seg-line, rgba(0,0,0,.04)), inset 0 1px 2px rgba(0,0,0,.05);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
html .vx-seg.vx-seg::-webkit-scrollbar { display: none; }
html .vx-seg.vx-seg > :not(.vx-seg-thumb) {
  position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 9px 18px; border: 0; border-radius: 999px; background: none; box-shadow: none;
  font-family: inherit; font-size: 14px; line-height: 1.2; font-weight: 500; text-align: center; white-space: nowrap;
  color: var(--vx-seg-tx, #6b6b70); cursor: pointer; transition: color .2s ease; -webkit-tap-highlight-color: transparent;
}
html .vx-seg.vx-seg > :not(.vx-seg-thumb)::after { content: none; display: none; }
@media (hover:hover) {
html .vx-seg.vx-seg > :not(.vx-seg-thumb):hover { color: var(--vx-seg-tx-on, #1f1f1f); }
}
html .vx-seg.vx-seg > [aria-selected="true"], html .vx-seg.vx-seg > .on, html .vx-seg.vx-seg > .active {
  color: var(--vx-seg-tx-on, #1f1f1f); background: none; font-weight: 500;
}
html .vx-seg.vx-seg > :not(.vx-seg-thumb):focus-visible { outline: 2px solid #9a9aa0; outline-offset: -2px; }
.vx-seg-thumb {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: 999px; background: var(--vx-seg-thumb, #fff);
  box-shadow: var(--vx-seg-sh, 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.08)); opacity: 0; transform: translateX(0); pointer-events: none;
  transition: transform .34s var(--vx-seg-ease, cubic-bezier(.3,.9,.3,1)), width .34s var(--vx-seg-ease, cubic-bezier(.3,.9,.3,1)), opacity .2s ease;
}
.vx-seg.has-thumb > .vx-seg-thumb { opacity: 1; }
.vx-seg.no-anim > .vx-seg-thumb { transition: none; }
@media (prefers-reduced-motion: reduce) { .vx-seg-thumb, html .vx-seg.vx-seg > :not(.vx-seg-thumb) { transition: none; } }

/* per-bar sizing */
html .vx-seg.vx-seg.an-seg > :not(.vx-seg-thumb) { padding: 7px 15px; font-size: 13px; }
html .vx-seg.vx-seg.an-tabs { margin-bottom: 18px; }
html .an-sheet .vx-seg.vx-seg.an-tabs { margin: 12px 22px 2px; align-self: flex-start; }                 /* Answer Keys analysis: tab strip inside the sheet */
html .vx-seg.vx-seg .an-tab em { background: var(--vx-seg-track, #ebebee); }
html .vx-seg.vx-seg > [aria-selected="true"] em { background: var(--vx-seg-line, rgba(0,0,0,.06)); }
html .vx-seg.vx-seg.res-tabs { height: auto; margin: 10px 12px 4px; background: var(--vx-seg-track, #ebebee); border-bottom: 0; }   /* dashboard (phone) resource tabs */
html .vx-seg.vx-seg.res-tabs > :not(.vx-seg-thumb) { flex: 1 1 0; font-size: 14px; }
html .vx-seg.vx-seg.rp-tabs { justify-content: flex-start; }
html .mode-toggle.vx-seg.vx-seg { width: 100%; }
html .mode-toggle.vx-seg.vx-seg > :not(.vx-seg-thumb) { flex: 1 1 0; padding: 10px 12px; }   /* Test Portal: Practice Mode / Test Mode */
@media (max-width: 1024px) {
  html .vx-seg.vx-seg.rp-tabs, html .vx-seg.vx-seg.res-tabs, html .vx-seg.vx-seg.py-tabs { width: 100%; }
  html .vx-seg.vx-seg.rp-tabs > :not(.vx-seg-thumb), html .vx-seg.vx-seg.py-tabs > :not(.vx-seg-thumb) { flex: 1 1 0; padding-left: 10px; padding-right: 10px; }
  html .an-sheet .vx-seg.vx-seg.an-tabs { margin: 8px 10px 2px; max-width: calc(100% - 20px); }
}

/* phones / compact: slimmer toggle */
@media (max-width: 1024px) {
  html .vx-seg.vx-seg { padding: 3px; }
  html .vx-seg.vx-seg > :not(.vx-seg-thumb) { padding-top: 6px; padding-bottom: 6px; }
  html .vx-seg.vx-seg.an-seg > :not(.vx-seg-thumb) { padding-top: 5px; padding-bottom: 5px; }
  .vx-seg-thumb { top: 3px; height: calc(100% - 6px); }
}
