/* Tab Pill — DesignBookmark stretchy pill, Mipix colors */

.stats-mode-switch,
.shop-mode-bar,
.stats-mode-bar {
  display: flex;
  position: relative;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(28, 26, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
  font-family: var(--font-body, "Quicksand", system-ui, sans-serif);
}

.stats-mode-switch {
  margin: -18px auto 36px;
  margin-left: auto;
  margin-right: auto;
}

.shop-mode-bar {
  margin: 8px auto 20px;
  margin-left: auto;
  margin-right: auto;
  left: auto;
  transform: none;
}

.shop-mode-bar--sub {
  margin-top: 0;
  margin-bottom: 28px;
}

.stats-mode-bar {
  margin-bottom: 22px;
}

.stats-mode-switch .mode-glider,
.shop-mode-bar .mode-glider,
.stats-mode-bar .mode-glider,
.tab-pill__glider {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  height: auto;
  width: 0;
  border-radius: 999px;
  pointer-events: none;
  /* Same accent as .hero-nav-btn hover / primary CTAs */
  background: linear-gradient(135deg, var(--amber, #b6743e), var(--orange, #f06114));
  border: 1px solid rgba(240, 97, 20, 0.55);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.28),
    0 6px 18px rgba(240, 97, 20, 0.32);
  transition: none;
  will-change: transform, width;
}

.stats-mode-switch .mode-btn,
.shop-mode-bar .mode-btn,
.stats-mode-bar .mode-btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #9a9590;
  padding: 10px clamp(12px, 2.4vw, 18px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s ease;
}

.stats-mode-switch .mode-btn i,
.stats-mode-bar .mode-btn i {
  font-size: 13px;
  opacity: 0.9;
}

.stats-mode-switch .mode-btn:hover,
.shop-mode-bar .mode-btn:hover,
.stats-mode-bar .mode-btn:hover {
  color: #e8e0d6;
}

.stats-mode-switch .mode-btn.active,
.shop-mode-bar .mode-btn.active,
.stats-mode-bar .mode-btn.active,
.stats-mode-switch .mode-btn[aria-selected="true"],
.shop-mode-bar .mode-btn[aria-selected="true"],
.stats-mode-bar .mode-btn[aria-selected="true"] {
  color: #fff;
}

@media (max-width: 640px) {
  .stats-mode-switch {
    max-width: calc(100% - 24px);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .stats-mode-switch::-webkit-scrollbar {
    display: none;
  }
  .stats-mode-switch .mode-btn,
  .shop-mode-bar .mode-btn,
  .stats-mode-bar .mode-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  .shop-mode-bar {
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .shop-mode-bar::-webkit-scrollbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-pill__glider,
  .mode-glider {
    transition: transform 0.15s ease, width 0.15s ease;
  }
}
