/* ============================================================================
 * Mode Switcher Tab Bar
 *
 * Horizontal tab bar for switching between Study, Flash Cards, Practice, Exam
 * within the same module. Appears below breadcrumbs on all module sub-pages.
 * Uses design tokens from theme.css — no hardcoded colors.
 * ============================================================================ */

.mode-switcher {
  background: transparent;
  padding: var(--space-sm) var(--space-lg);
}

.mode-switcher__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.mode-switcher__inner::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.mode-switcher__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.mode-switcher__tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  text-decoration: none;
}

.mode-switcher__tab:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.mode-switcher__tab--active {
  background: var(--primary);
  color: var(--primary-on);
}

.mode-switcher__tab--active:hover {
  background: var(--primary-hover);
  color: var(--primary-on);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .mode-switcher {
    padding: var(--space-xs) var(--space-sm);
  }

  .mode-switcher__inner {
    justify-content: flex-start;
    gap: var(--space-xs);
  }

  .mode-switcher__tab {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-md);
  }
}
