/* ==========================================================================
   AIRH Tabs Navigation — Futuristic Neumorphism
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Tab List Container
   --------------------------------------------------------------------------- */
.tabs {
  display: flex;
  flex-direction: column;
}

.tabs__list {
  display: flex;
  align-items: stretch;
  border-bottom: none;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs__list::-webkit-scrollbar {
  display: none;
}

/* ---------------------------------------------------------------------------
   Tab Items — Neumorphic
   --------------------------------------------------------------------------- */
.tabs__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tabs__item:hover {
  color: var(--color-text-primary);
  background: rgba(0,0,0,0.02);
}

/* Active Tab */
.tabs__item.is-active {
  color: var(--color-text-primary);
  font-weight: 700;
}

/* Active Underline — Gradient */
.tabs__item.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #6366f1);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* Sliding Underline (JS-driven) */
.tabs__indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #6366f1);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  transition: left var(--transition-base), width var(--transition-base);
  will-change: left, width;
}

/* When using .tabs__indicator, remove the pseudo */
.tabs--animated .tabs__item.is-active::after {
  display: none;
}

/* Tab Icon */
.tabs__item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.tabs__item.is-active .tabs__item-icon {
  opacity: 1;
  color: var(--color-accent);
}

/* Tab Count Badge — Neumorphic */
.tabs__item-count {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.4;
  box-shadow: var(--neu-inset-sm);
}

.tabs__item.is-active .tabs__item-count {
  background: linear-gradient(135deg, var(--color-accent), #6366f1);
  color: #fff;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Tab Content
   --------------------------------------------------------------------------- */
.tabs__content {
  padding: var(--space-6) 0;
}

.tabs__panel {
  display: none;
}

.tabs__panel.is-active {
  display: block;
  animation: tabFadeIn 200ms ease;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------------------
   Compact Variant
   --------------------------------------------------------------------------- */
.tabs--compact .tabs__item {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}

.tabs--compact .tabs__item.is-active::after {
  left: var(--space-3);
  right: var(--space-3);
}

/* ---------------------------------------------------------------------------
   Pill Variant — Neumorphic inset container
   --------------------------------------------------------------------------- */
.tabs--pill .tabs__list {
  border-bottom: none;
  gap: var(--space-1);
  padding: var(--space-1);
  border-radius: var(--radius-lg);
  display: inline-flex;
  box-shadow: var(--neu-inset-sm);
}

.tabs--pill .tabs__item {
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
}

.tabs--pill .tabs__item.is-active {
  background: var(--color-bg-primary);
  box-shadow: var(--neu-raised-sm);
}

.tabs--pill .tabs__item.is-active::after {
  display: none;
}

/* ---------------------------------------------------------------------------
   Mobile — Scrollable
   --------------------------------------------------------------------------- */
@media (max-width: 639px) {
  .tabs__list {
    padding: 0 var(--space-4);
    margin: 0 calc(-1 * var(--space-4));
  }

  .tabs__item {
    padding: var(--space-3) var(--space-3);
  }

  .tabs__content {
    padding: var(--space-4) 0;
  }
}
