@use '../../styles/mixins' as *;

.nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-md);
  overflow-y: auto;

  @include mobile {
    flex-direction: row;
    width: 100%;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--space-xs) var(--space-sm);
    gap: 0;
    flex-wrap: nowrap;
  }
}

.tab {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
  text-align: left;
  width: 100%;

  &:hover {
    background: var(--bg-overlay);
    color: var(--text-primary);
  }

  &:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: -2px;
  }

  @include mobile {
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    width: auto;
    border-radius: 0;
  }
}

.tabIcon {
  font-size: var(--font-size-base);
  line-height: 1;
  flex-shrink: 0;
}

.tabActive {
  border-left-color: var(--accent-green);
  background: var(--bg-overlay);
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);

  @include mobile {
    border-left-color: transparent;
    border-bottom-color: var(--accent-green);
  }
}
