/**
 * Modern Tabs Component (shadcn style)
 * Underline-style tabs with clean, minimal design
 */

/* Tabs Container */
.tabs-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.tabs-list::-webkit-scrollbar {
  display: none;
}

.tabs-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Individual Tab Button */
.tab {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-muted-foreground);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* Tab Hover State */
.tab:hover {
  color: var(--color-foreground);
}

/* Tab Active State - Class-based */
.tab--active,
.tab.is-active,
.tab[aria-selected="true"] {
  color: var(--color-foreground);
  border-bottom-color: var(--color-primary);
}

/* Tab Content Panel */
.tab-content {
  padding: var(--space-4) 0;
  display: none;
}

.tab-content--active,
.tab-content.is-active,
.tab-content[aria-hidden="false"] {
  display: block;
  animation: fadeIn var(--transition-base);
}

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

/* Mobile Responsive */
@media (max-width: 767px) {
  .tabs-list {
    gap: 0;
  }

  .tab {
    flex: 1;
    justify-content: center;
    padding: var(--space-3);
    font-size: var(--font-size-xs);
  }
}
