/* Dewdrop Tokens
/* tabs.css — Tab Component
   Sticky segmented control with panel switching
   Depends on tokens.css
*/

.tab-bar {
  position: sticky;
  top: 96px;
  z-index: 50;
  background: rgba(10,6,33,0.45);
  backdrop-filter: blur(20px) saturate(110%);
  -webkit-backdrop-filter: blur(20px) saturate(110%);
  border-bottom: 1px solid var(--glass-border, rgba(90,200,250,0.12));
  padding: var(--sp-1, 8px) 0;
}

.tab-bar::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 1px);
  height: var(--sp-4, 32px);
  background: linear-gradient(
    to bottom,
    rgba(10,6,33,0.55),
    rgba(10,6,33,0.2) 50%,
    transparent
  );
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  pointer-events: none;
  z-index: 49;
}

.tab-bar-inner {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 var(--section-x, clamp(20px,4vw,48px));
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar-inner::-webkit-scrollbar { display: none; }

.tab {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary, rgba(255,255,255,0.48));
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: var(--r-sm, 8px);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  min-height: 36px;
}
.tab:hover {
  color: var(--text-primary, rgba(255,255,255,0.96));
  background: rgba(255,255,255,0.06);
}
.tab.active {
  color: var(--text-primary, rgba(255,255,255,0.96));
  background: rgba(90,200,250,0.12);
  font-weight: 600;
}

.tab-container {
  position: relative;
}

.tab-panel {
  display: none;
  animation: tabFadeIn 0.3s ease;
  padding-top: var(--sp-4, 32px);
}
.tab-panel.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .tab-bar { top: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel { animation: none; }
}
