.tabs {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);
}

.tabs-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: calc(var(--spacing) * 9);
  padding: 3px;
  border-radius: var(--radius-lg);
  background-color: var(--color-muted);
  color: var(--color-muted-foreground);
}

.tabs-trigger {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: calc(100% - 1px);
  padding: var(--spacing) calc(var(--spacing) * 2);
  transition: var(--default-transition-duration)
    var(--default-transition-timing-function);
  transition-property: color, box-shadow;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background-color: transparent;
  color: var(--color-foreground);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--text-sm--line-height);
  white-space: nowrap;
  gap: calc(var(--spacing) * 1.5);

  /* State */
  &[data-state="active"] {
    background-color: var(--color-background);
    box-shadow: var(--shadow-xs);
  }

  /* Focus */
  &:focus-visible {
    border-color: var(--color-ring);
    outline: 1px solid var(--color-ring);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--coor-ring) 50%, transparent);
  }

  /* Disabled */
  &:disabled {
    opacity: 0.5;
    pointer-events: none;
  }

  /* Icon */
  & > svg {
    flex-shrink: 0;
    width: calc(var(--spacing) * 4);
    height: calc(var(--spacing) * 4);
    pointer-events: none;
  }
}

.tabs-content {
  flex: 1;
  outline-style: none;
}

:global(.dark) {
  .tabs-trigger {
    color: var(--color-muted-foreground);

    &[data-state="active"] {
      border-color: var(--color-input);
      background-color: color-mix(
        in oklab,
        var(--color-input) 30%,
        transparent
      );
      color: var(--color-foreground);
    }
  }
}
